Skip to content
Prev 36357 / 63424 Next

as(1:4, "numeric") versus as.numeric(1:4, "numeric")

The point I was making was that as() is not just a synonym for selecting 
a method from coerce() by the usual inheritance rules.  I don't believe 
it should be, and the documentation emphasizes that inheritance is not 
used in the ordinary way.

If one were to start rewriting code (which I'm not suggesting) my 
preference would be to  have coerce() not be a generic function, 
eliminating the offending selectMethod() calls.

John
On 4/1/10 12:31 AM, Herv? Pag?s wrote: