Up: Component summary Component

KaplanMeierPlot

Plots Kaplan Meier survival plot using the survival and survminer R packages. Optionally forest plot is produced if multivariate Cox model is performed.

Version 1.0
Bundle tools
Categories Analysis
Authors Amjad Alkodsi (Amjad.Alkodsi@Helsinki.FI)
Issue tracker View/Report issues
Requires survival (R-package) ; survminer (R-package) ; cowplot (R-package) ; ggthemes (R-package) ; ggplot2 (R-package) ; broom (R-package)
Source files component.xml KaplanMeierPlot.r
Usage Example with default values

Inputs

Name Type Mandatory Description
in CSV Optional Input csv file having survival data (time , event, grouping).

Outputs

Name Type Description
plots BinaryFolder Folder containing plots in pdf format.
plotObject BinaryFile The R plot object. Can be read into R using readRDS function to be further edited if needed
survPvalue CSV A CSV file containing the p-value obtained from the survival analysis
CoxStats CSV If run, this output will have the Cox multivariate regression statistics

Parameters

Name Type Default Description
eventText string "DEAD" The text in statusColumn pointing to an event.
ggplotExtra string "" ggplot expressions to be added to the plot to allow advanced customization. e.g. "ggtitle('my plot') + theme(plot.title = element_text(size = 20))".
groupColumn string "group" Name of the column having the groups to be differentiated.
otherOptions string "" A string of function parameters to be pasted in the ggsurvplot call. e.g. "conf.int = T, linetype = 2"
showPval boolean true Whether the p-value is printed on the plot.
showRiskTable boolean true Whether to show the risk table in the plot.
statusColumn string "status" Name of the column having the events.
strataCols string "" Comma separated columns name to be dependent variables in Cox multivariate analysis
timeColumn string "time" Name of the column having the follow up time.
xlabel string "Time" Title of the x axis.
ylabel string "Survival Probability" Title of the y axis.

Test cases

Test case Parameters IN
in
OUT
plots
OUT
plotObject
OUT
survPvalue
OUT
CoxStats
case1 properties in (missing) (missing) (missing) (missing)

groupColumn=sex,
eventText=2,
strataCols=age,ph.ecog

case2 properties in (missing) (missing) (missing) (missing)

groupColumn=sex,
eventText=2,
showRiskTable=false,
otherOptions=conf.int = T,palette=c('#E64B35FF','#3C5488FF')


Generated 2019-02-08 07:42:18 by Anduril 2.0.0