I have performed this operation before, but this time it doesn't work and I don't know why. I have also not found a similar topic here which deals with factors.
I want to remove all rows from a dataset which have certain contents (see code below):
em_nineties <- data.frame(subset(em_df, !(Year == '1985-1987', '1985',
'1986', '1987', '1988', '1989') ))
Error: unexpected ',' ...
Excerpt of data frame
Year emissions Poll Country Sector
1553 1993 0.00000 CO2 Austria 6
1554 2006 0.00000 CO2 Austria 6
1555 2015 0.00000 CO2 Austria 6
2243 1998 12.07760 CO2 Austria 5
2400 1992 11.12720 CO2 Austria 5
2401 1995 11.11040 CO2 Austria 5
2402 2006 10.26000 CO2 Austria 5
2489 1998 0.00000 CO2 Austria 6
I don't understand why this is a problem now. I can't see any typos or ',' which shouldn't be there...
Does anybody has a quick idea?
Thanks a lot in advance!
Nordsee