Created
January 9, 2012 14:15
-
-
Save yanping/1583113 to your computer and use it in GitHub Desktop.
Sample Rprofile.site file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 设置常用选项 | |
options(papersize="a4") | |
options(editor="notepad") | |
options(pager="internal") | |
options(tab.width = 2) | |
options(width = 130) | |
options(graphics.record=TRUE) | |
options(show.signif.stars=FALSE) | |
# 设置R交互提示信息 | |
options(prompt="> ") | |
options(continue="+ ") | |
.libPaths("C:/my_R_library") # 设置包的本地库(library)路径 | |
# 设置CRAN镜像默认地址 | |
local({r <- getOption("repos") | |
r["CRAN"] <- "http://cran.case.edu/" | |
options(repos=r)}) | |
# 启动函数 | |
.First <- function(){ | |
library(lattice) | |
library(Hmisc) | |
source("C:/mydir/myfunctions.R") | |
cat("\nWelcome at", date(), "\n") | |
} | |
# 会话结束函数 | |
.Last <- function(){ | |
cat("\nGoodbye at ", date(), "\n") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment