Function base::data.frame() creates a data frame, i.e., an R object of S3 class 'data.frame'. Listing 18.1 summarizes the S3 methods for the class 'data.frame' in the spatstat.* family of packages,
The S3 generic function as.groupedHyperframe() creates a grouped hyper data frame (groupedHyperframe, Chapter 25). Package groupedHyperframe (v0.3.2.20251225) implements the following S3 methods (Table 18.2),
Table 18.2: S3 methods of groupedHyperframe::as.groupedHyperframe (v0.3.2.20251225)
visible
isS4
as.groupedHyperframe.data.frame
TRUE
FALSE
as.groupedHyperframe.groupedData
TRUE
FALSE
as.groupedHyperframe.hyperframe
TRUE
FALSE
The S3 method as.groupedHyperframe.data.frame() converts a data frame with substantial amount of duplicated information into a grouped hyper data frame.
inspects the input data frame lung0 (Listing 2.1) by the user-specified (nested) grouping structure, e.g., image_id nested in patient_id;
identifies the input data frame column(s) with non-identical elements within the lowest group, e.g., the numeric column lung0$hladr and the factor column lung0$phenotype;
converts these column(s) into the hypercolumn(s) of the output grouped hyper data frame (Listing 2.2), e.g., the numeric-hypercolumn lung_g$hladr and the factor-hypercolumn lung_g$phenotype. Each row of the output grouped hyper data frame (Listing 2.2) represents the lowest group of the nested grouping structure.