Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • airGR airGR
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 64
    • Issues 64
    • List
    • Boards
    • Service Desk
    • Milestones
  • Redmine
    • Redmine
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

La forge gitlab.irstea.fr sera définitivement arrêtée le 30 juin 2026. Nous vous invitons à migrer vos projets vers la forge INRAE. Vous trouverez plus de détails sur le blog de la forge INRAE.

Le service a été transféré vers un nouvel hébergement le mercredi 3/12/2025. Cependant les accès par SSH n'ont pas encore été rétablis. Nous faisons au mieux pour régler ces problèmes rapidement. Merci de votre compréhension et de votre patience.

  • HYCAR-HydroHYCAR-Hydro
  • airGRairGR
  • Issues
  • #195
Closed
Open
Issue created Jul 16, 2025 by Dorchies David@david.dorchiesDeveloper

SeriesAggreg fails on columns with units

Minimal Reproducible Example with calculation of mean temperature with units:

d <- seq.POSIXt(
  from = as.POSIXct("2020-01-01 00:00:00", tz = "UTC"),
  to = as.POSIXct("2021-12-31 23:59:59", tz = "UTC"),
  by = "1 day"
)
df <- data.frame(d = d, v = units::as_units(rep(1, length(d)), "°C"))
QM <- SeriesAggreg(df, Format = "%Y%m", ConvertFun = "mean")

The call to SeriesAggreg ends with: Error in [.data.frame(tsAggreg, , colnames(TabSeries0)) : undefined columns selected

The call to :

aggregate(. ~ Fac2, data = TabSeries2[, colTsAggreg], 
          FUN = listConvertFun[[y]], na.action = na.pass)

in SeriesAggreg.data.frame renames the columns containing the data... One workaround could be to rename manually the columns to their original name after this call.

This issue doesn't seem to occur on sum, and it seem that column renaming is a common issue with aggregate (https://stackoverflow.com/questions/15309205/name-columns-within-aggregate-in-r)

Edited Jul 16, 2025 by Dorchies David
Assignee
Assign to
Time tracking