library(groupedHyperframe)
library(survival)42 grouped_ppp()
The examples in Chapter 42 require
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,
- the point-pattern marks, e.g., a numeric mark
hladrand a multi-type markphenotype, on the left-hand-side - the additional predictors and/or endpoints for downstream analysis, e.g.,
OS,genderandage, before the|separator on the right-hand-side. - the (nested)
grouping structure, e.g.,image_idnested inpatient_id, after the|separator on the right-hand-side.
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.
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 --- ✂️