mkExcelCsd: Make RR Excel file from csd output

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/mkExcelCsd.R

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

1
2
mkExcelCsd(seerSet,tsdn,biny="[1975,2017)",bina="(0,126]",
                        outDir="~/Results",outName=NULL,flip=FALSE)

Arguments

seerSet

A seerSet list after it has been processed by csd().

tsdn

Name of set of times since diagnosis. This is based on the brkst argument to csd(). If length >1 a brkst vector is assumed and coerced/collapsed to a tsdn string.

biny

Year at DX interval.

bina

Age at DX interval.

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

Returned invisibly, a list of data frames corresponding to sheets of the Excel file.

Note

Outputs are for a given sex. Races are typically pooled.

Author(s)

Tom Radivoyevitch (radivot@ccf.org)

See Also

SEERaBomb-package, mk2D,seerSet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
library(SEERaBomb)
pm=simSeerSet()
pm=mk2D(pm) 
mybrks=c(0,1,5,10)
pm=csd(pm,brkst=mybrks,trts=c("noRad","rad")) 
(lab=paste0("b",paste(mybrks,collapse="_")))
(L=mkExcelCsd(pm,lab))
(L=mkExcelCsd(pm,lab,flip=TRUE))

## End(Not run)

SEERaBomb documentation built on Dec. 16, 2019, 1:21 a.m.