options("repos" = c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))
对应清华源
options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/")
对应中科大源当然可以换成其他地区的镜像
install.packages("包") BiocManager::install("包“)包的加载
以下两个都可以使用
library(包) require(包)实例
options("repos" = c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))
options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/")
install.packages("dplyr")
library(dplyr)
mutate()
新增列
mutate(test,new=Sepl.Lengh*Sepal.Width)
select()
按列筛选select(test,1)
select(test,Sepal.Length)
filter()
arrange()
sunnarise()
%>%
该命令可以用ctrl+shift+M 可以将前一行输出的结果传递给后一行作为输入
count()
inner_join
内连取交集left_jion
左连full_join
全连bind_rows()
两个表格列数相同 bind_cols()
两个数据框有相同的行数原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。