applyFilter | R Documentation |
Apply Filter Criteria from List
applyFilter(data, criteria_list, element, length_column = NULL)
data |
data frame |
criteria_list |
list of (named) vectors of character representing filter criteria |
element |
name of list element to be selected fom |
length_column |
passed to |
criteria_list <- list( apple = c("is red or green" = "colour %in% c('red', 'green')"), banana = c("is not straight" = "! straight") ) fruit_properties <- data.frame( colour = c("green", "red", "yellow"), straight = c(TRUE, TRUE, FALSE) ) applyFilter(fruit_properties, criteria_list, "apple") applyFilter(fruit_properties, criteria_list, "banana")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.