Filter a data frame by the filterTerms. Accepts arbitrary text as filterTerms to allow forms such as "Sepal.Length >= 2 * Sepal.Width".
filter_se(.data, filterTerms, env = parent.frame())
.data | data.frame |
---|---|
filterTerms | character vector or list of column expressions to filter by. |
env | environment to work in. |
.data filtered by columns named in filterTerms
upperBound <- 3.5 datasets::iris %.>% filter_se(., qe(Sepal.Length >= 2 * Sepal.Width, Petal.Length <= upperBound))#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.9 2.4 3.3 1.0 versicolor #> 2 5.0 2.0 3.5 1.0 versicolor #> 3 5.7 2.6 3.5 1.0 versicolor #> 4 5.0 2.3 3.3 1.0 versicolor #> 5 5.1 2.5 3.0 1.1 versicolor