-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alex Zajichek
authored and
Alex Zajichek
committed
Nov 1, 2023
1 parent
5f4befa
commit 752287c
Showing
6 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
^docs$ | ||
^pkgdown$ | ||
^\.github$ | ||
^data-raw$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#' Radical Cystectomy for Bladder Cancer | ||
#' | ||
#' A fake data set representing the structure of what would be used to build the model for predicting 5-year recurrence-free survival after radical cystectomy (RC) for bladder cancer and subsequent risk calculator at https://riskcalc.org/bladderCancer/ | ||
#' | ||
#' @format ## `bladderCancer` | ||
#' A data frame with 1000 rows and 9 columns: | ||
#' \describe{ | ||
#' \item{Gender}{Patient gender} | ||
#' \item{Age}{Age of patient at time of RC} | ||
#' \item{RCTumorPathology, RCTumorHistology, RCTumorGrade}{Pathology, histology, and grade of the tumor at time of RC} | ||
#' \item{LymphNodeStatus}{Status of the lymph node} | ||
#' \item{DaysBetweenDXRC}{Number of days between cancer diagnosis and RC} | ||
#' \item{Recurrence}{Did the cancer re-occur? 1=Yes, 0=No (censored)} | ||
#' \item{Time}{Years from RC in which the recurrent event occurred or the patient was censored} | ||
#' } | ||
#' @source <https://github.com/ClevelandClinicQHS/riskcalc/blob/main/data-raw/bladderCancer.R> | ||
"bladderCancer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## code to prepare `bladderCancer` dataset | ||
|
||
# Load package | ||
library(tibble) | ||
|
||
# Set sample size | ||
n <- 1000 | ||
|
||
# Randomly sample like-variables (see https://riskcalc.org/bladderCancer/) | ||
set.seed(123) | ||
bladderCancer <- | ||
tibble( | ||
Gender = sample(c("M", "F"), n, replace = TRUE), | ||
Age = rnorm(n, 50, 10), | ||
RCTumorPathology = sample(c("pT0", "pTa", "pTis", "pT1", "pT2", "pT3", "pT4"), n, replace = TRUE), | ||
RCTumorHistology = sample(c("TCC", "SCC", "ADENOCARCINOMA"), n, replace = TRUE), | ||
RCTumorGrade = sample(c("High", "Low", "GX"), n, replace = TRUE), | ||
LymphNodeStatus = sample(c("Negative", "Positive", "NX"), n, replace = TRUE), | ||
DaysBetweenDXRC = rnorm(n, 500, 100), | ||
Recurrence = rbinom(n, 1, .5), | ||
Time = rweibull(n, 2, 15) | ||
) | ||
|
||
# Add data to package | ||
usethis::use_data(bladderCancer, overwrite = TRUE) |
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.