Skip to content

Poll: Does R_PAPERSIZE in /etc/R/Renviron matter?

7 messages · Dirk Eddelbuettel, Robert King, Markus Jäntti +2 more

#
A heuristic runs via the r-base-core package postinst. It is intended
to use the result from Debian's paperconf(1) toool, and to update the R
environment variable R_PAPERSIZE accordingly.  This apparently broke some
time ago when R changed to a dual variable setup, and my regexp didn't
notice. 

Does anybody use this, or is it ok if I simply disable this in Debian?  In
that case we simply do what everybody else does, so you all get to live by
the 'letter' setting that comes from my compile-time choice.  It is easy
enough to override either in /etc/R/Renviron or in ~/.Renviron.

Opinions either way? Let me know. For now, I intend to simply comment this
out in the next release (presumably a rc for 2.4.1).

Thanks, Dirk
#
I use it.

Thanks,
Robert.
On Tue, 24 Oct 2006 06:36, Dirk Eddelbuettel wrote:

  
    
#
I had not noticed it was broken, so don't seem to use the papersize 
setting much.

Markus
Dirk Eddelbuettel wrote:

  
    
#
Dirk Eddelbuettel <edd <at> debian.org> writes:
What it is actually used for? Living in Europe I "hate" letter, but never
noticed any effect of that setup. Uff, I have papersize="a4" in options() in
~/.Rprofile so that is probably the reason that I do not care.

Gregor
#
On 23 October 2006 at 15:36, Dirk Eddelbuettel wrote:
| 
| A heuristic runs via the r-base-core package postinst. It is intended
| to use the result from Debian's paperconf(1) toool, and to update the R
| environment variable R_PAPERSIZE accordingly.  This apparently broke some
| time ago when R changed to a dual variable setup, and my regexp didn't
| notice. 
| 
| Does anybody use this, or is it ok if I simply disable this in Debian?  In
| that case we simply do what everybody else does, so you all get to live by
| the 'letter' setting that comes from my compile-time choice.  It is easy
| enough to override either in /etc/R/Renviron or in ~/.Renviron.
| 
| Opinions either way? Let me know. For now, I intend to simply comment this
| out in the next release (presumably a rc for 2.4.1).

My thanks to those who answered already. For those who are perplexed, I
should have add the following few paragraphs.

Run

	$ echo 'print(options("papersize"))' | R --slave

to see your current setting. 

R 2.4.0 has a new heuristic based on the locale:

	The way option("papersize") is set has been changed.  On
	platforms which support the LC_PAPER locale category, the
	setting is taken first from the R_PAPERSIZE environment
	variable at run time, then from the LC_PAPER category
	("letter" for _US and _CA locales and "a4" otherwise).	On
	other platforms (including Windows and older Unixen), the
	choice is unchanged.

which should get it right for most people.  If not, the easiest per-user
override is in ~/.Renviron, and system-wide could be done in
/etc/R/Renviron. 

Thanks, Dirk
#
On Mon, 23 Oct 2006 15:36:02 -0500,
Dirk Eddelbuettel <edd at debian.org> wrote:
[...]
I also have to use 'letter' here (but feel much like Gregor ;-) ), so
hadn't noticed the change.

I think it would be good to rely on paperconf, to keep the Debianness.


Cheers,
#
On 24 October 2006 at 08:18, Sebastian P. Luque wrote:
| On Mon, 23 Oct 2006 15:36:02 -0500,
| Dirk Eddelbuettel <edd at debian.org> wrote:
| > Does anybody use this, or is it ok if I simply disable this in Debian?
| > In that case we simply do what everybody else does, so you all get to
| > live by the 'letter' setting that comes from my compile-time choice.  It
| > is easy enough to override either in /etc/R/Renviron or in ~/.Renviron.
| 
| I also have to use 'letter' here (but feel much like Gregor ;-) ), so
| hadn't noticed the change.
| 
| I think it would be good to rely on paperconf, to keep the Debianness.

I know, I know, I also like to feel smug that we this so much better than
everybody else.  

So maybe I will change the original 

  ## Default printer paper size: first record if user set R_PAPERSIZE
  R_PAPERSIZE_USER=${R_PAPERSIZE}
  R_PAPERSIZE=${R_PAPERSIZE-'@R_PAPERSIZE@'}

to something where the right-hand side ${R_PAPERSIZE} gets replaced in
postinst by what paperconf finds.  I can't seem to find a way to have
/etc/R/Renviron do anything dynamically, i.e. even something like

R_PAPERSIZE:=$(shell paperconf)

fails.

Dirk