library(groupedHyperframe)45 grouped_ppp()
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/.
The examples in Chapter 45 require
The function grouped_ppp() creates a grouped hyper data frame (Chapter 25) with one-and-only-one 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 45.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 ~ ., by = ~ patient_id/image_id)
# Hypercolumn(s) dapi created!
# Grouped Hyper Data Frame: ~patient_id
#
# 3 patient_id
#
# gender OS age patient_id image_id dapi ppp.
# 1 M 176 84 #03 2-080-378 [36953,13765].im3 (numeric) (ppp)
# 2 M 176 84 #03 2-080-378 [39206,15250].im3 (numeric) (ppp)
# 3 M 176 84 #03 2-080-378 [40242,17359].im3 (numeric) (ppp)
# 4 M 176 84 #03 2-080-378 [40863,16444].im3 (numeric) (ppp)
# 5 F 3488+ 85 #01 0-889-121 [40864,18015].im3 (numeric) (ppp)
# ✂️ --- output truncated --- ✂️