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 23.1 summarizes the S3 methods for the class 'groupedData' in packages nlme ,
The examples in Chapter 23 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" "splines"
# [64] "stats" "survival" "systemfonts" "tensor" "textshaping" "tibble" "tidyselect" "tools" "utils"
# [73] "vctrs" "viridisLite" "xfun" "yaml"
Table 23.1 summarizes the S3 methods for the class 'groupedData' in package groupedHyperframe (v0.3.4),
Create groupedHyperframe
The S3 method as.groupedHyperframe.groupedData() (Section 17.1 , Table 17.2 ) converts a grouped data frame into a grouped hyper data frame (groupedHyperframe, Chapter 24 ) using its grouping structure.
Listing 23.3 converts the grouped data frame Remifentanil (Listing 23.2 ) from package nlme (Pinheiro, Bates, and R Core Team 2025, v3.1.168 ) into a grouped hyper data frame.
Listing 23.5 converts the grouped data frame bdf (Listing 23.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 23.8 ), because the hyperframe object (Chapter 25 ) carries additional auxiliary information. And even when it does reduce the memory allocation (Listing 23.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 23.7 ).
Pinheiro, José, Douglas Bates, and R Core Team. 2025.
nlme : Linear and Nonlinear Mixed Effects Models.
https://CRAN.R-project.org/package=nlme .