(dplyr)arrange(test, Sepal.Length) #从小到大arrange(test, desc(Sepal.Length)) #从大到小,没有increasedistinct,数据框按照某一列去重复...distinct(test,Species,.keep_all = T)#.keep_all意思是把所有列都保存下来mutate,数据框新增一列mutate(test, new = Sepal.Length...s=s+i print(c(i,s))}x <- c(5,6,0,3)s = 0for (i in 1:length(x)){ s=s+x[[i]] print(c(x[[i]],s))}#如何将结果存下来...geom_boxplot(aes(fill = group))+ theme_bw()pp + facet_wrap(~gene,scales = "free")专题五:隐式循环#1.apply 处理矩阵或数据框...sapply 简化结果,返回矩阵或向量sapply(test,mean)sapply(test,fivenum)class(sapply(test,fivenum))专题六:两个数据框的链接test1