Learn R Programming

tidyft (version 0.4.5)

filter: Filter entries in data.frame

Description

Analogous function for filter in dplyr.

Usage

filter(.data, ...)

Arguments

.data

data.frame

...

List of variables or name-value pairs of summary/modifications functions.

Value

A data.table

Details

Currently data.table is not able to delete rows by reference,

References

https://github.com/Rdatatable/data.table/issues/635

https://stackoverflow.com/questions/10790204/how-to-delete-a-row-by-reference-in-data-table

See Also

filter

Examples

Run this code
# NOT RUN {
iris = as.data.table(iris)
iris %>% filter(Sepal.Length > 7)
iris %>% filter(Sepal.Length > 7,Sepal.Width > 3)
iris %>% filter(Sepal.Length > 7 & Sepal.Width > 3)
iris %>% filter(Sepal.Length == max(Sepal.Length))
# }

Run the code above in your browser using DataLab