renumber_time_id_tt {msSPChelpR} | R Documentation |
Renumber the time ID per case (i.e. Tumor sequence) - tidytable version
Description
Renumber the time ID per case (i.e. Tumor sequence) - tidytable version
Usage
renumber_time_id_tt(
df,
new_time_id_var,
dattype = NULL,
case_id_var = NULL,
time_id_var = NULL,
diagdat_var = NULL,
timevar_max = Inf
)
Arguments
df |
dataframe |
new_time_id_var |
Name of the newly calculated variable for time_id. Required. |
dattype |
can be "zfkd" or "seer" or NULL. Will set default variable names if dattype is "seer" or "zfkd". Default is NULL. |
case_id_var |
String with name of ID variable indicating same patient.
E.g. |
time_id_var |
String with name of variable that indicates diagnosis per patient.
E.g. |
diagdat_var |
String with name of variable that indicates date of diagnosis per event.
E.g. |
timevar_max |
Numeric; default Inf. Maximum number of cases per id. All tumors > timevar_max will be deleted. |
Value
df
Examples
data(us_second_cancer)
us_second_cancer %>%
#only select first 10000 rows so example runs faster
dplyr::slice(1:10000) %>%
msSPChelpR::renumber_time_id_tt(new_time_id_var = "t_tumid",
dattype = "seer",
case_id_var = "fake_id")
[Package msSPChelpR version 0.9.1 Index]