Filter a PicnicHealth data set using a specified list of patients
filter_data_set.RdFilter a PicnicHealth data set using a specified list of patients
Details
If operation = "include", the default, filter_data_set() will subset
all tables in the PicnicHealth data set list object, ds, to only rows
associated with the vector of person_ids. If operation = "exclude",
filter_data_set() will subset all tables in the PicnicHealth data set
list object, ds, to remove any rows associated with the vector of
person_ids.
See also
load_data_set()to load an entire directory of PicnicHealth data set tables as CSV files.load_table()to load an individual PicnicHealth table and optionally specify data type conversions.
Examples
if (FALSE) { # \dontrun{
person_ids = c("aaa", "bbb", "ccc")
# Subset all tables to person_ids:
filtered_ds = filter_data_set(ds = ds, person_ids = person_ids, operation = "include")
# Remove person_ids from all tables:
filtered_ds = filter_data_set(ds = ds, person_ids = person_ids, operation = "exclude")
} # }