According to my book, I try to practice . But I face a confused problem about typing order
library(magrittr)
library(dplyr)
abc<-diamonds%>%filter(cut%in%c('Ideal','Good'))
def<-diamonds%>%filter(cut%in%c('Good','Ideal'))
ABC<-filter(diamonds,cut==c('Ideal','Good'))
DEF<-filter(diamonds,cut==c('Good','Ideal'))
I mean the outputs are same between abc and def. when I type the last two, I get two datasets which are totally different.ABC includes 13229 observation and DEF inculdes 13228.And there is an interesting condition that the number of abc observations is 26457.I guess the abc's observations is separated into ABC&DEF by some unknown logic and the logic maybe has some relationship with the changed order.
Anyone can tell me reason?
Thanks!