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

2010-02-25 Thread Bert Gunter
Genentech Nonclinical Biostatistics -Original Message- From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] Sent: Wednesday, February 24, 2010 11:13 PM To: gunter.ber...@gene.com; p...@stat.auckland.ac.nz Cc: r-de...@stat.math.ethz.ch; r-b...@r-project.org Subject: Re: [Rd] grid unit

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

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

2010-02-24 Thread Prof Brian Ripley
is.numeric() is generic. So grid could include is.numeric.unit - function(x) FALSE and register it in its namespace. Or Bert could define it in his application. On Thu, 25 Feb 2010, gunter.ber...@gene.com wrote: Paul: I figured that would be the problem. I encountered the issue when

[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