| tnsKM,TNS-method {RTNsurvival} | R Documentation |
Creates survival curves and tests if there is a difference between curves using 'survfit' and 'survdiff' functions, respectivelly.
## S4 method for signature 'TNS' tnsKM(tns, regs = NULL, sections = 1, verbose = TRUE)
tns |
A TNS object, which must have passed GSEA2 analysis. |
regs |
An optional string vector listing regulons to be tested. |
sections |
A numeric value for sample stratification. The larger the number, the more subdivisions will be created for the Kaplan-Meier analysis. |
verbose |
A logical value specifying to display detailed messages (when verbose=TRUE) or not (when verbose=FALSE). |
Results from 'survfit' and 'survdiff', including log-rank statistics.
# load survival data
data(survival.data)
# load TNI-object
data(stni, package = "RTN")
stns <- tni2tnsPreprocess(stni, survivalData = survival.data,
keycovar = c('Grade','Age'), time = 1, event = 2)
stns <- tnsGSEA2(stns)
stns <- tnsKM(stns)
tnsGet(stns, "kmTable")