(dplyr)arrange(test, Sepal.Length) #从小到大arrange(test, desc(Sepal.Length)) #从大到小,没有increasedistinct,数据框按照某一列去重复...* Sepal.Width)连续的步骤# 1.多次赋值,产生多个变量x1 = filter(iris,Sepal.Width>3)x2 = select(x1, Sepal.Length,Sepal.Width...嵌套,代码不易读arrange(select(filter(iris,Sepal.Width>3), Sepal.Length,Sepal.Width), Sepal.Length...explibrary(tidyr)library(tibble)library(dplyr)dat = t(exp) %>% #转置 as.data.frame() %>% #转换为数据框架 rownames_to_column...#apply(X, MARGIN, FUN, …) #其中X是数据框/矩阵名;#MARGIN为1表示行,为2表示列,FUN是函数test<- iris[1:6,1:4]apply(test, 2, mean