plotkm: Plot KM curve

Description Usage Arguments Examples

Description

This function will plot a KM curve with possible stratification. You can specifyif you want a legend or confidence bands as well as the units of time used.

Usage

1
2
  plotkm(data, response, group = 1, pos = "bottomleft",
    units = "months", CI = F, legend = T, title = "")

Arguments

data

dataframe containing your data

response

character vector with names of columns to use for response

group

string specifiying the column name of stratification variable

pos

what position you want the legend to be. Current option are bottomleft and topright

units

string specifying what the unit of time is use lower case and plural

CI

boolean to specify if you want confidence intervals

legend

boolean to specify if you want a legend

title

title of plot

Examples

1
2
3
4
require(survival)
lung$sex<-factor(lung$sex)
plotkm(lung,c("time","status"))
plotkm(lung,c("time","status"),"sex")

reportRx documentation built on May 2, 2019, 10:44 a.m.

Related to plotkm in reportRx...