View source: R/advanced_R_studies.R
Takes in a dataframe, and returns a dataframe with all rows where at least one column defined in 'cols' contains any of the values defined in 'values'.
Example:
countryCols <- c("origin", "transit", "destination")
df <- fixMultCols(df, countryCols, "United States")
1 | selectByMultCols(df, cols, values)
|
df |
The dataframe you wish to select. |
cols |
The names of the columns you wish to select with. |
values |
A character vector that contains that values you wish to select with. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.