subset_by_filters | R Documentation |
Subsets a dataframe rows based on filters
subset_by_filters(df, filters, delim = ";")
df |
A dataframe |
filters |
A string in the form of filters delimited by default ";". Each filter has 3 parts: 1) column name in df, 2) operator either != or ==, 3) value in column to exclude/include |
delim |
A string/character to seperate individuals filter by, default is ";" |
subset_by_filters(df, "Smoker==Yes;Cancer.subtype!=NA") # positively select for smokers and remove NA from Cancer.subtype column
logical vector of length = nrow(df) indicating rows to keep with respect to inclusion/exclusion criteria
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.