This works (so nice in Shiny):
filter_(mtcars, "mpg > 24")
and this:
filter_(mtcars, "mpg > 24", "disp > 75")
Is there a way to make this work as well?
filter_(mtcars, "mpg > 24, disp > 75")
This works as an alternative
filter_(mtcars, "mpg > 24 & disp > 75")
Edit 1
This works but is there a better way?
filter_(mtcars,unlist(strsplit("mpg > 24, disp > 75", ",")))
EDIT 2
The previous edit may not work as expected. It is equivalent to the following:
filter_(mtcars,c("mpg > 24", "disp > 75"))
Where the 2nd condition is ignored
mpg cyl disp hp drat wt qsec vs am gear carb
1 24.4 4 146.7 62 3.69 3.19 20.0 1 0 4 2
2 32.4 4 78.7 66 4.08 2.20 19.5 1 1 4 1
3 30.4 4 75.7 52 4.93 1.61 18.5 1 1 4 2
4 33.9 4 71.1 65 4.22 1.83 19.9 1 1 4 1
5 27.3 4 79.0 66 4.08 1.94 18.9 1 1 4 1
6 26.0 4 120.3 91 4.43 2.14 16.7 0 1 5 2
7 30.4 4 95.1 113 3.77 1.51 16.9 1 1 5 2