10 thoughts on “Could someone please set this as the new R default in base graphics?

  1. How hard can it be to write a single R script that sets all your preferred defaults and call it with source() at the start of everything you do? ;)

  2. You can put this in your .Rprofile:

    <pre>setHook('plot.new', function(…) par(mar=c(3,3,2,1), mgp=c(2,.7,0), tck=-.01))</pre>

    Then every time you create a new plot, this par settings will be applied (for base R graphics, of course). Furthermore, you will always have to use this setting.

  3. perhaps las=1, bty="l" (for Tufte-correctness, not wasting ink) while we're at it? And we should really do
    palette(c("black","red","blue","cyan","magenta","green3","yellow","gray")) [i.e. move green farther down the list] to encourage dichromat-friendly colo[u]r schemes … (once you get to yellow and gray you're usually getting a little desperate in any case)

  4. Could someone please set the default regression summary so that it tells you the number of observations used in the regression? You figure something as simple as this would be in the default/base package.

  5. I just reread the R-intro.pdf (in the Rdocmanual folder) which contained the answer on how to set this (and everything else you want) globally. Just add the lines to the file ‘Rprofile.site’ in the R home subdirectory ‘etc’ (you can even add the source statement to load your personal functions).

    The problem with adding it to .Rprofile is that it (basically) only works if R is started from that directory.

    See 10.8 of the R-intro.pdf for a short but concise treatment of "Customizing the environment".

Comments are closed.