Learn R Programming

SEERaBomb (version 2016.1)

mkExcel: Make RR Excel file

Description

Provides relative risks (RR) organized by 1st and 2nd cancers, times since 1st cancer diagnoses, and 1st cancer treatment. RR = O/E where O = observed cases and E = cases expected under a null hypothesis that prior cancers do not impact subsequent risks. If flip = FALSE (default), sheets = 1st cancers and rows = 2nd cancers, else sheets = 2nd cancers and rows = 1st cancers; columns are always intervals of years since diagnosis, in 1st cancer treatment blocks. RR CI and observed numbers are included in each data cell.

Usage

mkExcel(seerSet,tsdn,outDir="~/Results",outName=NULL,flip=FALSE)

Arguments

seerSet
A seerSet list after it has been processed by tsd().
tsdn
Name of set of times since diagnosis. This is based on the brks argument to tsd(). If length >1 a brkst vector is assumed and coerced/collapsed to a tsdn string.
outDir
Folder of the Excel file that will be generated.
outName
if null (default), Excel file name = seerSet base file name (bfn) + tsdn, else it is outName. Eitherway, "Flipped" is appended to the name if flip is TRUE.
flip
If FALSE, sheets are first cancers, rows seconds. If TRUE, sheets are second cancers, rows firsts.

Value

See Also

SEERaBomb-package, mk2D,seerSet

Examples

Run this code
## Not run: 
# library(SEERaBomb)
# pm=simSeerSet()
# pm=mk2D(pm) 
# mybrks=c(0,1,5,10)
# pm=tsd(pm,brkst=mybrks,trts=c("noRad","rad")) 
# (lab=paste0("b",paste(mybrks,collapse="_")))
# (L=mkExcel(pm,lab))
# (L=mkExcel(pm,lab,flip=TRUE))
# ## End(Not run)

Run the code above in your browser using DataLab