Re: [R] is.na for S4 object

2015-06-05 Thread Martin Maechler
> Martin Morgan > on Thu, 4 Jun 2015 10:33:37 -0700 writes: > On 06/04/2015 10:08 AM, cgenolin wrote: >> Hi the list, >> >> I have a variable y that is either NA or some S4 object. I would like to >> know in which case I am, but it seems taht is.na does not work w

Re: [R] is.na for S4 object

2015-06-05 Thread cgenolin
So easy! Thanks a lot. -- View this message in context: http://r.789695.n4.nabble.com/is-na-for-S4-object-tp4708201p4708234.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more

Re: [R] is.na for S4 object

2015-06-04 Thread Martin Morgan
On 06/04/2015 10:08 AM, cgenolin wrote: Hi the list, I have a variable y that is either NA or some S4 object. I would like to know in which case I am, but it seems taht is.na does not work with S4 object, I get a warnings: --- 8< setClass("myClass",slots=c(x="numeric")) if(runif(1)

[R] is.na for S4 object

2015-06-04 Thread cgenolin
Hi the list, I have a variable y that is either NA or some S4 object. I would like to know in which case I am, but it seems taht is.na does not work with S4 object, I get a warnings: --- 8< setClass("myClass",slots=c(x="numeric")) if(runif(1)>0.5){a <- new("myClass")}else{a <- NA} is