Label groups based on a given cutoff
See also
Other functions to analyse survival:
assignValuePerSubject(),
getAttributesTime(),
optimalSurvivalCutoff(),
plotSurvivalCurves(),
plotSurvivalPvaluesByCutoff(),
processSurvTerms(),
survdiffTerms(),
survfit.survTerms(),
testSurvival()
Examples
labelBasedOnCutoff(data=c(1, 0, 0, 1, 0, 1), cutoff=0.5)
#> [1] ">= 0.5" "< 0.5" "< 0.5" ">= 0.5" "< 0.5" ">= 0.5"
labelBasedOnCutoff(data=c(1, 0, 0, 1, 0, 1), cutoff=0.5, "Ratio")
#> [1] "Ratio >= 0.5" "Ratio < 0.5" "Ratio < 0.5" "Ratio >= 0.5"
#> [5] "Ratio < 0.5" "Ratio >= 0.5"
# Use "greater than" instead of "greater than or equal to"
labelBasedOnCutoff(data=c(1, 0, 0, 0.5, 0, 1), cutoff=0.5, gte=FALSE)
#> [1] "> 0.5" "<= 0.5" "<= 0.5" "<= 0.5" "<= 0.5" "> 0.5"