1 Star 2 Fork 2

连享会/replication-template

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
template-config.R 1011 Bytes
一键复制 编辑 原始数据 按行查看 历史
Lars Vilhuber 提交于 2020-06-09 13:19 . Added the library loading function
#Template config.R
# If the author uses R, use this template, copy it to config.R and
# include in the authors' program(s) with
# source("config.R", echo=TRUE)
####################################
# global libraries used everywhere #
####################################
mran.date <- "2019-09-01"
options(repos=paste0("https://cran.microsoft.com/snapshot/",mran.date,"/"))
pkgTest <- function(x)
{
if (!require(x,character.only = TRUE))
{
install.packages(x,dep=TRUE)
if(!require(x,character.only = TRUE)) stop("Package not found")
}
return("OK")
}
## Add any libraries to this line, and uncomment it.
global.libraries <- c("foreign","devtools","rprojroot")
results <- sapply(as.list(global.libraries), pkgTest)
# check if the author creates a log file. If not, adjust the following code fragment
# the easiest way is from the command line:
# R --vanilla < program.R > program.log
# keep this line in the config file
print(sessionInfo())
print(paste0("MRAN date was set to: ",mran.date))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/arlionn/replication-template.git
git@gitee.com:arlionn/replication-template.git
arlionn
replication-template
replication-template
master

搜索帮助