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")
}
效果图
网友评论