就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引起辩论、争论、投票或扩展讨论。如果你觉得这个问题可以改进并可能重新打开,visit the help center 寻求指导。
8年前关闭。
我一直发现其他人的启动配置文件对语言既有用又有益。此外,虽然我对 Bash 和 Vim 进行了一些自定义,但我对 R 一无所知。
例如,我一直想要的一件事是窗口终端中输入和输出文本的不同颜色,甚至可能是语法突出显示。
最佳答案
这是我的。它不会帮助你着色,但我从 ESS 和 Emacs 那里得到了...
options("width"=160) # wide display with multiple monitors
options("digits.secs"=3) # show sub-second time stamps
r <- getOption("repos") # hard code the US repo for CRAN
r["CRAN"] <- "http://cran.us.r-project.org"
options(repos = r)
rm(r)
## put something this is your .Rprofile to customize the defaults
setHook(packageEvent("grDevices", "onLoad"),
function(...) grDevices::X11.options(width=8, height=8,
xpos=0, pointsize=10,
#type="nbcairo")) # Cairo device
#type="cairo")) # other Cairo dev
type="xlib")) # old default
## from the AER book by Zeileis and Kleiber
options(prompt="R> ", digits=4, show.signif.stars=FALSE)
options("pdfviewer"="okular") # on Linux, use okular as the pdf viewer
关于r - 专家 R 用户,您的 .Rprofile 中有什么?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/1189759/