Memor.の 2009-07-27 18:17 采纳率: 100%
浏览 660
已采纳

专家 r 用户,在你的。 Rprofile? ? [打烊]

I have always found startup profile files of other people both useful and instructive about the language. Moreover, while I have some customization for Bash and Vim, I have nothing for R.

For example, one thing I always wanted is different colors for input and output text in a window terminal, and maybe even syntax highlighting.

转载于:https://stackoverflow.com/questions/1189759/expert-r-users-whats-in-your-rprofile

  • 写回答

24条回答 默认 最新

  • elliott.david 2009-08-20 21:59
    关注

    Here is mine. It won't help you with the coloring but I get that from ESS and 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
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(23条)

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制