42  grouped_ppp()

The examples in Chapter 42 require

library(groupedHyperframe)
library(survival)

Function grouped_ppp() creates a grouped hyper data frame (Chapter 25) with one-and-only-one (Section 26.13) ppp-hypercolumn, from a data frame.

In Listing 3.1, the argument formula takes form of <marks> ~ <variable.of.interest> | <group>, specifically,

Listing 42.1 shows the use of the dot symbol . to denote the remaining variables except for those mentioned in the marks and the nested grouping structure.

Listing 42.1: Advanced: function grouped_ppp(formula = <marks> ~ . | <group>)
wrobel_lung |>
   grouped_ppp(formula = hladr + phenotype ~ . | patient_id/image_id)
# Grouped Hyperframe: ~patient_id/image_id
# 
# 15 image_id nested in
# 3 patient_id
# 
#       patient_id          image_id gender    OS age  ppp.
# 1  #01 0-889-121 [40864,18015].im3      F 3488+  85 (ppp)
# 2  #01 0-889-121 [42689,19214].im3      F 3488+  85 (ppp)
# 3  #01 0-889-121 [42806,16718].im3      F 3488+  85 (ppp)
# 4  #01 0-889-121 [44311,17766].im3      F 3488+  85 (ppp)
# ✂️ --- output truncated --- ✂️