# NOT RUN {
library(survivALL)
data(nki_subset)
library(Biobase)
pheno <- pData(nki_subset)
compSelect(pheno, "grade", values = c(1, 2, 3), props = c(10, 10, 5))
#to manufacture composition from a continuous measure, first translate into a
#categorical equivalent, e.g.
age <- pheno$age
pheno$age_group <- ifelse(age < 40, "<40", ifelse(age < 50, "40-50", ">=50"))
compSelect(pheno,
"age_group",
values = c("<40", "40-50", ">=50"),
props = c(2, 5, 10))
# }
Run the code above in your browser using DataLab