This function plots the survival curve for the provided data set as a Kaplan Meier plot. It can only be used for visualization and returns no numeric values.
Usage
kmplt(data, title)
Arguments
data
A data frame containing at least the two columns “censored” and “True_STs”. Where “censored” contains the censorship status of the subject as either “0/F” for
‘uncensored subjects’ or “$1$/T” for ‘censored subjects’.
This information is essential to be able to plot the KM curve.
title
A string of characters denoting the title of the plot produced.
Details
Note that this function was intended only for visualization and does not return any numerical values as such.
Value
A plot of the survival function “S(t)” against the survival times (unit-less) as calculated for the provided data set.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(RCASPAR)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/RCASPAR/kmplt.Rd_%03d_medium.png", width=480, height=480)
> ### Name: kmplt
> ### Title: Plot Kaplan Meier curve
> ### Aliases: ' kmplt '
> ### Keywords: Kaplan Meier Survival function
>
> ### ** Examples
>
> censored <- c(1, 0, 1, 1, 1, 0, 1, 0, 0, 0)
> True_STs <- c(1, 4, 5, 4, 6, 3, 2, 1, 3, 4)
> dat <- as.data.frame(cbind(True_STs, censored))
> kmplt(dat, "test")
>
>
>
>
>
> dev.off()
null device
1
>