56  hyperframe

ImportantDisclaimer

These packages (Note 1) are a one-person project undergoing rapid evolution. Backward compatibility (per Hadley Wickham) is provided as a courtesy rather than a guarantee.

Until further notice, these packages should

  • not be used as a basis for research grant applications,
  • not be cited as an actively maintained tool in a peer-reviewed manuscript,
  • not be used to support or fulfill requirements for pursuing an academic degree.

In addition, work primarily based on these packages (Note 1) should not be presented at academic conferences or similar scholarly venues.

Furthermore, a person’s ability to use these packages (Note 1) does not necessarily imply an understanding of their underlying mechanisms. Accordingly, demonstration of their use alone should not be considered sufficient evidence of expertise, nor should it be credited as a basis for academic promotion or advancement.

These statements do not apply to the contributors (Tip 1) to these packages (Note 1) with respect to their specific contributions.

These statements do not apply when the maintainer of these packages (Note 1), Tingting Zhan, is credited as the first author, the lead author, and/or the corresponding author in a peer-reviewed manuscript, or as the Principal Investigator or Co-Principal Investigator in a research grant application and/or a final research progress report.

These statements are advisory in nature and do not modify or restrict the rights granted under the GNU General Public License https://www.r-project.org/Licenses/.

Chapter 56 outlines the S3 methods currently not planned for the class 'hyperframe' (Chapter 26).

56.1 as.environment()

The author does not implement an S3 method to the class 'hyperframe' for the generic function as.environment(), as it would be a simple pipeline of the functions as.list.hyperframe() (v3.7.3, GPL (>= 2)) and list2env() (R version 4.5.3 (2026-03-11)).

Listing 56.1: Workaround: as.environment of hyperframe
ev = spatstat.data::demohyper |> 
  spatstat.geom::as.list.hyperframe() |>
  list2env()
ev |> 
  as.list.environment() |>
  lapply(FUN = class)
# $Group
# [1] "factor"
# 
# $Image
# [1] "imlist"  "solist"  "anylist" "listof"  "list"   
# 
# $Points
# [1] "ppplist" "solist"  "anylist" "listof"  "list"

56.2 merge()

The author does not implement an S3/S4 method to the S3 classes 'hyperframe' and/or 'groupedHyperframe' for the generic function merge(), for the obstacles explained below.

  1. There is not an S3 method merge.hyperframe in package spatstat.geom (v3.7.3, GPL (>= 2));

  2. Should the author elect to implement an S4 setMethod(f = merge, ...) for the class 'hyperframe', at least two method signatures must be defined,

    • c(x = 'hyperframe', y = 'data.frame')
    • c(x = 'hyperframe', y = 'hyperframe'), for which the author needs to define a match mechanism for hypercolumns.
  3. Should the author elect to implement an S4 setMethod(f = merge, ...) for the class 'groupedHyperframe', at least three method signatures must be defined,

    • c(x = 'groupedHyperframe', y = 'data.frame')
    • c(x = 'groupedHyperframe', y = 'hyperframe'), as explained above;
    • c(x = 'groupedHyperframe', y = 'groupedHyperframe'), for which the author needs to consider the (potentially different) grouping structures of x and y inputs.

The author suggests using the pipeline of functions merge.data.frame() (R version 4.5.3 (2026-03-11)) and aggregate2hyper() as a workaround.