tnsPlotKmInteraction,TNS-method {RTNsurvival} | R Documentation |
Plot results from Kaplan-Meier analysis for dual regulons
## S4 method for signature 'TNS' tnsPlotKmInteraction(tns, dualreg = NULL, fname = "kmInteraction", fpath = ".", xlab = "Months", ylab = "Survival probability", colorPalette = "bluered", width = 4, height = 4, plotpdf = FALSE)
tns |
A TNS object, which must have passed GSEA2 analysis. |
dualreg |
A character string with the name of a dual regulon. |
fname |
A string. The name of the file in which the plot will be saved |
fpath |
A string. The path to the directory where the plot will be saved |
xlab |
A string. The label for the x axis on the third panel. This should be the measure of time shown in the survival data.frame after the last check-up. |
ylab |
A string. The label for the y axis on the third panel |
colorPalette |
A string, which can be 'red', 'blue', 'redblue', or 'bluered'. Alternatively, it can be a vector of five colors or hex values. |
width |
A numeric value. Represents the width of the plot. |
height |
A numeric value. Represents the height of the plot. |
plotpdf |
A logical value. If TRUE, the plot is saved as a pdf file. If false, it is plotted in the plotting area. |
A plot, showing a graphical analysis for the 'tnsKmInteraction' function.
# 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) # KM analysis for dual regulons # stns <- tnsKmInteraction(stns, stepFilter=FALSE) # tnsPlotKmInteraction(stns, dualreg = "FOXM1~PTTG1")