#批量运行包:
all.pcg <- c("data.table","ggplot2","rmarkdown","tidyr","stringr","ggfortify")
sapply(all.pcg, library, character.only = T)
req.pcg <- function(pcg){
new <- pcg[!(pcg %in% installed.packages()[, "Package"])]
if (length(new)) install.packages(new, dependencies = T)
sapply(pcg, require, ch = T)
}
req.pcg(all.pcg)
批量运行R包
最新推荐文章于 2025-06-22 09:36:28 发布
1156

被折叠的 条评论
为什么被折叠?



