Learn R Programming

⚠️There's a newer version (0.9.1) of this package.Take me there.

msSPChelpR

What is msSPChelpR?

This package is a collection of helper functions for analyzing Second Primary Cancer (SPC) data, including functions to reshape data, to calculate patient states and analyze cancer incidence.

Installation

You can install the released version of msSPChelpR from CRAN with:

install.packages("msSPChelpR")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("marianschmidt/msSPChelpR")

How to use the package

An introductory vignette on the workflow of the package can be found here. See vignette("introduction").

Citation

In case you want to cite this package, please use citation('msSPChelpR') for reference information.

Copy Link

Version

Install

install.packages('msSPChelpR')

Monthly Downloads

272

Version

0.9.0

License

GPL-3

Maintainer

Marian Eberl

Last Published

June 10th, 2022

Functions in msSPChelpR (0.9.0)

calc_futime

Calculate follow-up time per case until end of follow-up depending on pat_status - tidyverse version
calc_refrates

Calculate age-, sex-, cohort-, region-specific incidence rates from a cohort
ir_crosstab

Calculate crude incidence rates and crosstabulate results by break variables
asir

Calculate age-standardized incidence rates
calc_futime_tt

Calculate follow-up time per case until end of follow-up depending on pat_status - tidytable version
%>%

Pipe operator
reshape_wide

Reshape dataset to wide format
reshape_long_tidyr

Reshape dataset to wide format - tidyr version
renumber_time_id_tt

Renumber the time ID per case (i.e. Tumor sequence) - tidytable version
msSPChelpR

msSPChelpR
vital_status

Calculate vital status at end of follow-up depending on pat_status - tidyverse version
reshape_long

Reshape dataset to long format - stats::reshape version
population_us

US Populations Data
ir_crosstab_byfutime

Calculate crude incidence rates and cross-tabulate results by break variables; cumulative FU-times as are used as xbreak_var
reshape_wide_tidyr

Reshape dataset to wide format - tidyr version
sir_ratio

Calculate Ratio of two SIRs or SMRs
sir_byfutime

Calculate standardized incidence ratios with custom grouping variables stratified by follow-up time
summarize_sir_results

Summarize detailed SIR results
reshape_long_tt

Reshape dataset to wide format - tidytable version
reshape_wide_tt

Reshape dataset to wide format - tidytable version
vital_status_tt

Calculate vital status at end of follow-up depending on pat_status - tidytable version
tidyeval

Tidy eval helpers
us_second_cancer

US Second Cancer Data
us_refrates_icd2

US Reference Rates for Cancer Data (ICD-O 2digit code)
standard_population

Standard Populations Data
renumber_time_id

Renumber the time ID per case (i.e. Tumor sequence)
pat_status_tt

Calculate patient status at specific end of follow-up - tidytable version
pat_status

Calculate patient status at specific end of follow-up - tidyverse version