library(groupedHyperframe)
library(survival)54 groupedHyperframe
The examples in Chapter 54 require
Chapter 54 outlines the S3 methods currently not planned for the class 'groupedHyperframe' (Chapter 25).
54.1 Use groupedHyperframe as grouped_ppp() input
Listing 54.1 creates a grouped hyper data frame lung_g2 which retains the \(x\)- and \(y\)-coords,
lung_g2 retaining \(x\)- and \(y\)-coords
lung_g2 = wrobel_lung |>
within.data.frame(expr = {
dapi = NULL
}) |>
as.groupedHyperframe(group = ~ patient_id/image_id)
lung_g2
# Grouped Hyperframe: ~patient_id/image_id
#
# 15 image_id nested in
# 3 patient_id
#
# x y hladr phenotype image_id patient_id gender OS age
# 1 (numeric) (numeric) (numeric) (factor) [40864,18015].im3 #01 0-889-121 F 3488+ 85
# 2 (numeric) (numeric) (numeric) (factor) [42689,19214].im3 #01 0-889-121 F 3488+ 85
# 3 (numeric) (numeric) (numeric) (factor) [42806,16718].im3 #01 0-889-121 F 3488+ 85
# 4 (numeric) (numeric) (numeric) (factor) [44311,17766].im3 #01 0-889-121 F 3488+ 85
# ✂️ --- output truncated --- ✂️A curious reader may wonder, is it possible to create a grouped hyper data frame with one-and-only-one ppp-hypercolumn, from a grouped hyper data frame? In other words, can we convert the grouped hyper data frame lung_g2 into something similar to the grouped hyper data frame s (Section 3.1)? Unfortunately, the author does not implement such functionality for package groupedHyperframe (v0.3.2.20251225).