... dplyr verbs: filter


Once again we assume that you've got the dataframe set up appropriately.


# This command makes sure that the chickweight dataframe is clean.
df <- ChickWeight %>% ungroup() %>% as.data.frame()

You can clearly define how you filter your rows by using the filter verb.

df %>% filter(Diet == 3)

Feedback? See an issue? Something unclear? Feel free to mention it here.

If you want to be kept up to date, consider signing up for the newsletter.