Learn R Programming

reportRx (version 1.0)

petsum: Print LaTeX event time summary

Description

Wrapper for the etsum function that prints paragraphs of text in LaTeX

Usage

petsum(data, response, group = 1, times = c(12, 14), units = "months")

Arguments

data
dataframe containing data
response
character vector with names of columns to use for response
group
string specifiying the column name of stratification variable
times
numeric vector of times you want survival time provbabilities for.
units
string indicating the unit of time. Use lower case and plural.

Examples

Run this code
require(survival)
lung$sex<-factor(lung$sex)
petsum(lung,c("time","status"),"sex")
petsum(lung,c("time","status"))
petsum(lung,c("time","status"),"sex",c(1,2,3),"months")

Run the code above in your browser using DataLab