美文网首页R语言杂记
Windows R 启动配置

Windows R 启动配置

作者: leoxiaobei | 来源:发表于2020-05-03 15:23 被阅读0次

Windows版本的R启动配置文件在R/etc/Rprofile.site文件中,用记事本打开即可

.First <- function(){
  #设置两个镜像
  options(BioC_mirror="https://mirrors.tuna.tsinghua.edu.cn/bioconductor")
  options("repos" = c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))
  # 加载程序包跟平常一样用library或require
  library(tidyverse)
  library(gplots)
  library(pheatmap)
  library(RColorBrewer)
  library(survminer)
  library(survival)
  library(ggbeeswarm)
  library(ggsci)
  library(ggsignif)
  library(ggrepel)
  #如果有自定义函数的话,使用source函数加载
  source("D:/my_customized_functions.R") 
  # 使用赞你包设置启动提示语,可有可无
  library(praise)
  cat(praise(" ${EXCLAMATION}!!! Yo Man, you have done this ${adverb_manner}!"),"\n",praise(),"\n",praise(),"\n",paste0(Sys.time()," ",Sys.timezone()),"\n") 
}
效果图

相关文章

网友评论

    本文标题:Windows R 启动配置

    本文链接:https://www.haomeiwen.com/subject/aatzwhtx.html