Re: [Rd] grid unit bug? (PR#14220)

2010-02-24 Thread gunter . berton
Paul: I figured that would be the problem. I encountered the issue when I tries to check arguments in a validDetails method for a grob. Could one substitute the following function in the grid namespace? is.numeric <- function(x)if(is.unit(x))TRUE else is.numeric(x) (or make the first clause FA

[Rd] grid unit bug? (PR#14220)

2010-02-22 Thread gunter . berton
The following seems to me to be at least a perverse trap, if not an = outright bug: > is.numeric(unit(1,"npc")) [1] TRUE > is.numeric(1*unit(1,"npc")) [1] FALSE > is.numeric(unit(0,"npc") +unit(1,"npc")) [1] FALSE ...etc. i.e. is.numeric() appears to be TRUE for class "unit" but false for = class

[Rd] bug in rep.unit method for grid arithmetic ? (PR#14170)

2009-12-28 Thread gunter . berton
The following code should suffice to document the problem. Things work properly in the following: > x <- unit.c(unit(5,"mm"),unit(3,"npc")) > x [1] 5mm 3npc > rep(x,2) [1] 5mm 3npc 5mm 3npc > rep(x, e=2) [1] 5mm 5npc 3mm 3npc > rep(x,c(2,2)) [1] 5mm 5npc 3mm 3npc However, not so for: > x

[Rd] Losing attributes in data.frame() (PR#10873)

2008-03-03 Thread gunter . berton
Folks: Problem: [<-.data,frame() is losing attributes under certain curcumstances shown below. I think this is a bug, at least in documentation, as I was unable to find explicit documentation of the behavior. Indeed, the only documentation I found told me attributes are preserved. Here is a de

[Rd] match.arg bug or documentation error (PR#9859)

2007-08-18 Thread gunter . berton
There is either a bug or undocumented feature (afaics) in match.arg that requires the length of the arg argument to be no longer than the length of the choices argument even when several.ok is TRUE. Here is a reproducible example: first: > sessionInfo() R version 2.5.0 Patched (2007-04-26 r4132

[Rd] error in apply help file? (PR#8118)

2005-09-01 Thread gunter . berton
Gents: (alas, I think no ladies need to be included in the salutation) The apply() Help file says "... If the calls to FUN return vectors of different lengths, apply returns a list of length dim(X)[MARGIN]. " Shouldn't that be: "If the calls to FUN return vectors of different lengths, apply ret

[Rd] S4 setClass with prototypes " issues" (PR#8053)

2005-08-05 Thread gunter . berton
To R-Developers: I wish to report what I believe are inconsistencies between Green Book descriptions and R methods behaviors. I **realize** that R does not guarantee total consistency with the Green Book; therefore I leave it to you to decide whether any of this is a bug, design choice, or a need