I have a data set of babynames I've been playing around with. I'm using dplyr to filter for babies born in what's considered the millenial age. So that would be any baby born from 1985 to 2005 (including 1985 and 2005). However, when I use dplyr I noticed that I get different filtered results depending on how I phrase the filter argument.
trial<-filter(babynames, year==1985:2005)
trial2<-filter(babynames, year >1984 & year<1986)
trial1 gives me ~70,000 results while trial2 has roughly double of that (~154,000). Is there a difference between these two forms of filtering? To me they should be giving me the same output? I feel like I am missing something here.