[R] is.na for S4 object
cgenolin
cgenolin at u-paris10.fr
Thu Jun 4 19:08:29 CEST 2015
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.na(a)
--- 8< ------------
Any solution?
Thanks
Christophe
--
View this message in context: http://r.789695.n4.nabble.com/is-na-for-S4-object-tp4708201.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list