[Rd] Re: [R] changing (core) function argument defaults?

From: Thomas Lumley <tlumley_at_u.washington.edu>
Date: Thu 18 Nov 2004 - 11:18:11 EST

Restricted to r-devel (it is almost never appropriate to send the same message to both lists).

On Thu, 18 Nov 2004, RenE J.V. Bertin wrote:
> &gt;From: Patrick Connolly &lt;p.connolly@hortresearch.co.nz&gt;
> &gt;To: &quot;RenE J.V. Bertin&quot; &lt;rjvbertin@hotmail.com&gt;
> &gt;Subject: Re: [R] changing (core) function argument defaults?
> &gt;Date: Thu, 18 Nov 2004 11:43:10 +1300
> &gt;
> &gt;On Wed, 20-Oct-2004 at 07:48PM +0200, RenE J.V. Bertin wrote:
> &gt;
> &gt;|&gt; Hello,
> &gt;|&gt;
> &gt;
> &gt;|&gt; Is it possible to change the defaults for the arguments to a
> &gt;|&gt; function, without changing the function code itself? I'm asking
> &gt;|&gt; because I'd like to override the default dimensions and font family
> &gt;|&gt; for a graphics device. Before 2.0.0, I'd just do that with a small
> &gt;|&gt; edit in the appropriate .R file containing the device function
> &gt;|&gt; definition. I appears to be possible no longer. So rather than
> &gt;|&gt; copying the definition into my own .Rprofile, it would be nice if
> &gt;|&gt; just the defaults could be modified...
> &gt;
> &gt;I didn't notice a response to this question. I'd like to do something
> &gt;similar and haven't been able to work out how to do it.

You can write a wrapper


    grDevices::X11(display,width,height,...) }

and put that into your Rprofile.


R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu Nov 18 11:24:15 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:01:29 EST