View source: R/renumber_time_id_tt.R
renumber_time_id_tt | R Documentation |
Renumber the time ID per case (i.e. Tumor sequence) - tidytable version
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 )
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. |
df
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.