par (mar=c(3,3,2,1), mgp=c(2,.7,0), tck=-.01)

Thank you.

Posted by Andrew on 29 October 2010, 8:00 pm

par (mar=c(3,3,2,1), mgp=c(2,.7,0), tck=-.01)

Thank you.

## Recent Comments

- Joe on The statistical checklist: Could there be a list of guidelines to help analysts do better work?
- Andrew on Data-based ways of getting a job
- Arnold on Data-based ways of getting a job
- Mark Schaffer on The “Carl Sagan effect”
- Dale Lehman on The “Carl Sagan effect”
- Andrew on The statistical checklist: Could there be a list of guidelines to help analysts do better work?
- David Bailey on The statistical checklist: Could there be a list of guidelines to help analysts do better work?
- Mark Schaffer on The “Carl Sagan effect”
- Raghuveer Parthasarathy on The “Carl Sagan effect”
- anon on The “Carl Sagan effect”
- Curious on The “Carl Sagan effect”
- Terry on The “Carl Sagan effect”
- Daniel Lakeland on The “Carl Sagan effect”
- Martha (Smith) on The “Carl Sagan effect”
- Mark Schaffer on The “Carl Sagan effect”
- Mark Schaffer on The “Carl Sagan effect”
- Daniel Lakeland on The “Carl Sagan effect”
- AP on The statistical checklist: Could there be a list of guidelines to help analysts do better work?
- Daniel Lakeland on The “Carl Sagan effect”
- Mark Schaffer on The “Carl Sagan effect”

## Categories

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? ;)

I've changed some of my defaults – you can put it in your .Rprofile and set it on your R, if you want.

tick should be .02

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

alwayshave to use this setting.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)

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.

Raymond: Use display().

Dodgy default settings in base graphics are there to encourage you to learn to use lattice or ggplot2. :)

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".

Hi, all. Those suggestions are good, but I want to change the defaults for

everyone, not just me!