Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

filter..html

Filter rows on one or more conditions


Description

Filters a dataset to choose rows where conditions are true.

Usage

filter.(.df, ..., .by = NULL)

Arguments

.df

A data.frame or data.table

...

Conditions to filter by

.by

Columns to group by if filtering with a summary function

Examples

test_df <- tidytable(
  a = 1:3,
  b = 4:6,
  c = c("a","a","b")
)

test_df %>%
  filter.(a >= 2, b >= 4)

test_df %>%
  filter.(b <= mean(b), .by = c)

tidytable

Tidy Interface to 'data.table'

v0.6.1
MIT + file LICENSE
Authors
Mark Fairbanks [aut, cre], Abdessabour Moutik [ctb], Matt Carlson [ctb], Ivan Leung [ctb], Ross Kennedy [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.