dataFilter | R Documentation |
This is a legacy alias for the 'sift' function to maintain compatibility with older code.
dataFilter(
df,
rows = NULL,
cols = NULL,
record_id = NULL,
src_subject_id = NULL,
subjectkey = NULL,
site = NULL,
subsiteid = NULL,
sex = NULL,
race = NULL,
ethnic_group = NULL,
phenotype = NULL,
phenotype_description = NULL,
status = NULL,
lost_to_followup = NULL,
twins_study = NULL,
sibling_study = NULL,
family_study = NULL,
sample_taken = NULL,
visit = NULL,
week = NULL,
arm = NULL,
interview_date = NULL
)
df |
Dataframe to be filtered and trimmed based on the provided parameters. |
rows |
Optional; either a single row name or a vector of row names to be retained in the final output. If NULL or empty, all rows in the dataframe are retained. |
cols |
Optional; either a single column name or a vector of column names to be retained in the final output. If NULL or empty, all columns in the dataframe are retained.#' Data Filter |
record_id |
Optional; either a single record_id or a vector of record_ids to filter the dataframe by |
src_subject_id |
Optional; either a single subject ID or a vector of subject IDs to filter the dataframe by |
subjectkey |
Optional; either a single subjectkey or a vector of subjectkeys to filter the dataframe by |
site |
Optional; either a single site value or a vector of site values to filter the dataframe by (e.g., Yale, NU) |
subsiteid |
Optional; either a single subsiteid or a vector of subsiteids to filter the dataframe by |
sex |
Optional; either a single sex value or a vector of sex values at birth to filter the dataframe by (e.g., 'M', 'F') |
race |
Optional; either a single race value or a vector of race values to filter the dataframe by |
ethnic_group |
Optional; either a single ethnic_group value or a vector of ethnic_group values to filter the dataframe by |
phenotype |
Optional; either a single phenotype value or a vector of phenotype values to filter the dataframe by |
phenotype_description |
Optional; either a single phenotype_description or a vector of phenotype_descriptions to filter the dataframe by |
status |
Optional; either a single status string or a vector of status conditions to filter the dataframe by. Used if either 'state' or 'status' column exists in the dataframe. Can include values like 'complete', 'completed baseline', 'completed 12m', 'completed 24m', etc. |
lost_to_followup |
Optional; either a single value or a vector of values to filter the dataframe by (checks both 'lost_to_followup' and 'lost_to_follow-up' columns) |
twins_study |
Optional; either a single twins_study value or a vector of twins_study values to filter the dataframe by |
sibling_study |
Optional; either a single sibling_study value or a vector of sibling_study values to filter the dataframe by |
family_study |
Optional; either a single family_study value or a vector of family_study values to filter the dataframe by |
sample_taken |
Optional; either a single sample_taken value or a vector of sample_taken values to filter the dataframe by |
visit |
Optional; either a single visit value or a vector of visit values to filter the dataframe by. Only used if 'visit' column exists in the dataframe. |
week |
Optional; either a single week value or a vector of week values to filter the dataframe by. Only used if 'week' column exists in the dataframe. |
arm |
Optional; either a single arm value or a vector of arm values to filter the dataframe by (e.g., drug, placebo) |
interview_date |
Optional; can be either: - A date string in various formats (ISO, US, etc.) to filter data up to that date - A boolean TRUE to return only rows with non-NA interview_date values |
A filtered dataframe based on the provided parameters, and containing only the columns specified in 'cols'. If no columns are specified, returns the entire dataframe with applied row filters.
## Not run:
filtered <- dataFilter(df, sex="F")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.