Description Usage Arguments Examples
This function allows you to find the first date of a diagnosis using ICD-codes. Can return the full data or just the index data and patient id.
1 2 3 4 5 6 7 8 | first_date_icd(
.data,
icd,
new_variable,
primary = TRUE,
secondary = TRUE,
keep = FALSE
)
|
.data |
A tibble with data in QTF-format. |
icd |
A character vector (or scalar) with ICD-codes that should be identified in the data. |
new_variable |
A character string with the column name for the new variable. |
keep |
Returns the full data, including the new date variable. Defaults to FALSE. |
1 2 | data(data_icd)
data_icd %>% combine_sdia() %>% first_date_icd("L405", "psa")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.