jeem67
jeem67

Reputation: 29

Exclude values from data.frame in R

I have the following dataframe:

Count Year
32   2018
346  2017
524  2016
533  2015
223  2014
1    2010
3    2008
1    1992

Is it possible to exclude the years 1992 and 2008. I tried different ways, but don't find a flexible solution. I would like to have the same dataframe without the years 1993 and 2008.

Many thanks in advance, jeemer

Upvotes: 0

Views: 28962

Answers (1)

Stephan
Stephan

Reputation: 2246

library(dplyr); filter(df, year != 1992 | year != 2008)

Upvotes: 1

Related Questions