Search code examples
rdplyrfilter

Can't get multiple rows using filter in R


First off, brand new to R. Here is the dataframe I am working with: enter image description here

I am trying to filter OUT the first row and keep the rest. I have tried using the code shown here:

>finaldata[finaldata$Date == '2010',]

Obviously, it is doing the opposite of what I want, and only showing the first row. This made sense to me after using it, but how can I go the other way, ridding the first row while keeping the rest in a data frame?

Tried various iterations of filter() and other recommendations found online.


Solution

  • To filter out first row you can use finaldata = finaldata [-1,]