lastnews_table {EDCimport} | R Documentation |
Get a table with the latest date for each patient
Description
This function search for date columns in every tables and returns the latest date for each patient with the variable it comes from. Useful in survival analysis to get the right censoring time.
Usage
lastnews_table(
except = NULL,
with_ties = FALSE,
numeric_id = TRUE,
prefer = NULL,
warn_if_future = TRUE
)
Arguments
except |
the datasets/columns that should not be searched. Example: a scheduled visit for which the patient may have died before attending should not be considered. |
with_ties |
in case of tie, whether to return the first |
numeric_id |
set to FALSE if the patient ID column is not numeric |
prefer |
preferred origins in the event of a tie. Usually the followup table. |
warn_if_future |
whether to show a warning about dates that are after the extraction date |
Value
a dataframe
Examples
tm = edc_example_plot()
load_list(tm)
lastnews_table()
lastnews_table(except="db3")
lastnews_table(except="db3$date9")
lastnews_table(prefer="db2")
[Package EDCimport version 0.5.2 Index]