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
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
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
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