R-alpha: warning(...)'s: want ``options(warn = -1)''; PATCH par()

Martin Maechler (maechler@stat.math.ethz.ch)
Wed, 26 Feb 97 13:01:13 +0100


Date: Wed, 26 Feb 97 13:01:13 +0100
Message-Id: <9702261201.AA01271@>
From: Martin Maechler <maechler@stat.math.ethz.ch>
To: r-testers@stat.math.ethz.ch
In-Reply-To: <199702260828.VAA02091@stat3.stat.auckland.ac.nz> (message from
Subject: R-alpha: warning(...)'s: want ``options(warn = -1)'';  PATCH par()


>>>>> "Rob" == Robert Gentleman <rgentlem@stat.auckland.ac.nz> writes:

    Rob> ... we'll put in a warning message if the length of the
    Rob> longer vector isn't a multiple of the length of the shorter;

which reminds me that we/I also would like something similar as S's
	
	options(warn = k)

k=  0 : [default]  print warnings

k= -1 :	do nothing		((maybe append warnings to some temp-file))
k=  1 : produce an error ('warning' becomes 'stop'). 

----
Since I'm wishing already:

Currently,  par()  returns a  49-element which is really outdated.

My current  $RHOME/src/library/funs/par  starts as follows:

.Pars <- c(
"1em", "adj", "ask", "bty", "cex", "cin", "col", "cra", "crt", "csi",
"cxy", "din", "err", "exp", "fig", "fin", "font", "frm", "fty", "lab",
"las", "lty", "lwd", "mai", "mar", "mex", "mfg", "mgp", "new", "oma",
"omd", "omi", "pch", "pin", "plt", "pty", "rsz", "smo", "srt", "tck",
"uin", "usr", "xaxp", "xaxs", "xaxt", "xpd", "yaxp", "yaxs", "yaxt")
##>> R-alpha  0.16.1
##>>  pp_ par(); names(pp[sapply(pp,is.null)])
##>>  [1] "1em" "cxy" "din" "exp" "frm" "fty" "rsz" "uin"
##>>       ---   ---   ---   ---   ---   ---   ---   ---  

##-- These are the ones used in 0.16.1 -- $RHOME/src/main/par.c  Query(..) :
.Pars <- c(
"adj", "ann", "ask", "bg", "bty",
"cex", "cex.axis", "cex.lab", "cex.main", "cex.sub", "cin",
"col", "col.axis", "col.lab", "col.main", "col.sub", "cra", "crt", "csi",
"err", "fg", "fig", "fin",
"font", "font.axis", "font.lab", "font.main", "font.sub", "lab", "las",
"lty", "lwd", "mai", "mar", "mex", "mfcol", "mfg", "mfrow", "mgp", "mkh",
"new", "oma", "omd", "omi", "pch", "pin", "plt", "ps", "pty",
"smo", "srt", "tck", "tmag", "type", "usr",
"xaxp", "xaxs", "xaxt", "xlog", "xpd",
"yaxp", "yaxs", "yaxt", "ylog")

------------
After starting R (which starts X11),
this now gives (using my  'str' function):

> str(par())
List of 64
 $ adj: num 0.5
 $ ann: num 1
 $ ask: logi FALSE
 $ bg: chr "white"
 $ bty: chr "o"
 $ cex: num 1
 $ cex.axis: num 1
 $ cex.lab: num 1
 $ cex.main: num 1.2
 $ cex.sub: num 1
 $ cin: num [1:2] 0.122 0.167
 $ col: chr "black"
 $ col.axis: chr "black"
 $ col.lab: chr "black"
 $ col.main: chr "black"
 $ col.sub: chr "black"
 $ cra: num [1:2] 11 15
 $ crt: num 0
 $ csi: num 0.167
 $ err: num 0
 $ fg: chr "black"
 $ fig: num [1:4] 0 1 0 1
 $ fin: num [1:2] 7 7
 $ font: num 1
 $ font.axis: num 1
 $ font.lab: num 1
 $ font.main: num 2
 $ font.sub: num 1
 $ lab: num [1:3] 5 5 7
 $ las: num 0
 $ lty: chr "solid"
 $ lwd: num 1
 $ mai: num [1:4] 0.850 0.683 0.683 0.350
 $ mar: num [1:4] 5.1 4.1 4.1 2.1
 $ mex: num 1
 $ mfcol: num [1:2] 1 1
 $ mfg: num [1:4] 1 1 1 1
 $ mfrow: num [1:2] 1 1
 $ mgp: num [1:3] 3 1 0
 $ mkh: num 0.122
 $ new: logi FALSE
 $ oma: num [1:4] 0 0 0 0
 $ omd: num [1:4] 0 1 0 1
 $ omi: num [1:4] 0 0 0 0
 $ pch: num 1
 $ pin: num [1:2] 5.96 5.47
 $ plt: num [1:4] 0.0976 0.9500 0.1214 0.9024
 $ ps: num 12
 $ pty: chr "m"
 $ smo: num 1
 $ srt: num 0
 $ tck: num -0.2
 $ tmag: num 1.2
 $ type: chr "p"
 $ usr: num [1:4] 0 1 0 1
 $ xaxp: num [1:3] 0 1 5
 $ xaxs: chr "r"
 $ xaxt: chr "s"
 $ xlog: logi FALSE
 $ xpd: logi FALSE
 $ yaxp: num [1:3] 0 1 5
 $ yaxs: chr "r"
 $ yaxt: chr "s"
 $ ylog: logi FALSE
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-