Analogous function for filter
in dplyr.
filter_dt(data, ...)
data | data.frame |
---|---|
... | List of variables or name-value pairs of summary/modifications functions. |
data.table
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1: 7.9 3.8 6.4 2 virginica# filter by compound condition mtcars %>% filter_dt(am==0,cyl == 4)#> mpg cyl disp hp drat wt qsec vs am gear carb #> 1: 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2 #> 2: 22.8 4 140.8 95 3.92 3.150 22.90 1 0 4 2 #> 3: 21.5 4 120.1 97 3.70 2.465 20.01 1 0 3 1