这是我第一次使用管道功能,我的教授还没有审查如何使用它,所以
我有点迷茫,我在最后一个问题上遇到了麻烦,因为自上次以来我很可能一直出错
分配与我的过滤器<=2相矛盾,提前谢谢你,以下是我的代码:
L.W<- iris %>%
select(Petal.Length,Petal.Width) %>% head()
print(L.W)
#b
S.L <- iris%>%
arrange(Sepal.Length)%>%
head()
print(S.L)
#c
iris%>
arrange(Sepal.Length)%>%
select(Species,Petal.Length,Petal.Width)%>%
head()
#Switch order
iris%>%
select(Species,Petal.Length,Petal.Width)%>%
head()
#there are two different data sets
#d
iris%>%
filter(Petal.Length<=2 & Petal.Width< mean(Petal.Width))%>%
mutate(Petal.Length)%>%
huge<-assign(Petal.Length>6)%>%
big<-assign(Petal.Length>5)%>%
medium<-assign(Petal.Length>4)%>%
small<-assign(Petal.Length<=4)%>%
head()