Function nlme::groupedData() (Pinheiro, Bates, and R Core Team 2025, v3.1.168 ) creates a grouped data frame , i.e., an R object of S3 class 'groupedData'. Listing 24.1 summarizes the S3 methods for the class 'groupedData' in packages nlme ,
The examples in Chapter 24 require
library (groupedHyperframe)
search path & loadedNamespaces on author’s computer
search ()
# [1] ".GlobalEnv" "package:groupedHyperframe" "package:stats" "package:graphics" "package:grDevices" "package:utils" "package:datasets"
# [8] "package:methods" "Autoloads" "package:base"
loadedNamespaces () |> sort.int ()
# [1] "abind" "base" "cli" "cluster" "codetools" "compiler" "datasets" "deldir" "digest"
# [10] "doParallel" "dplyr" "evaluate" "farver" "fastmap" "fastmatrix" "foreach" "generics" "geomtextpath"
# [19] "GET" "ggplot2" "glue" "goftest" "graphics" "grDevices" "grid" "gridExtra" "groupedHyperframe"
# [28] "gtable" "htmltools" "htmlwidgets" "iterators" "jsonlite" "knitr" "lattice" "lifecycle" "magrittr"
# [37] "Matrix" "matrixStats" "methods" "nlme" "otel" "parallel" "patchwork" "pillar" "pkgconfig"
# [46] "polyclip" "pracma" "R6" "RColorBrewer" "rlang" "rmarkdown" "rstudioapi" "S7" "scales"
# [55] "SpatialPack" "spatstat.data" "spatstat.explore" "spatstat.geom" "spatstat.random" "spatstat.sparse" "spatstat.univar" "spatstat.utils" "stats"
# [64] "systemfonts" "tensor" "textshaping" "tibble" "tidyselect" "tools" "utils" "vctrs" "viridisLite"
# [73] "xfun" "yaml"
Table 24.1 summarizes the S3 methods for the class 'groupedData' in package groupedHyperframe (v0.3.2.20251225),
Create groupedHyperframe
The S3 method as.groupedHyperframe.groupedData() (Section 18.1 , Table 18.2 ) converts a grouped data frame into a grouped hyper data frame (groupedHyperframe, Chapter 25 ) using its grouping structure.
Listing 24.3 converts the grouped data frame Remifentanil (Listing 24.2 ) from package nlme (Pinheiro, Bates, and R Core Team 2025, v3.1.168 ) into a grouped hyper data frame.
Listing 24.5 converts the grouped data frame bdf (Listing 24.4 ) from package nlme (Pinheiro, Bates, and R Core Team 2025, v3.1.168 ) into a grouped hyper data frame.
Converting a (grouped) data frame with substantial amount of duplicated information into a grouped hyper data frame not necessarily(!!) reduces the memory allocation (Listing 24.8 ), because the hyperframe object (Chapter 26 ) carries additional auxiliary information. And even when it does reduce the memory allocation (Listing 24.6 ), a grouped hyper data frame would not reduce much the saved file.size compared to a data frame, if xz compression is used for both (Listing 24.7 ).
Pinheiro, José, Douglas Bates, and R Core Team. 2025.
nlme : Linear and Nonlinear Mixed Effects Models.
https://CRAN.R-project.org/package=nlme .