[R] test to see if a s4 property is assigned?

darckeen darckeen at hotmail.com
Wed Sep 15 21:03:40 CEST 2010


Class("person",representation(age="numeric",weight="numeric"))
[1] "person"
> bob <- new("person",age=30)
> is.null(bob at weight)
[1] FALSE
> bob at weight
numeric(0)
> bob at weight == numeric(0)
logical(0)

How can i test to see if a s4 property is assigned?

-- 
View this message in context: http://r.789695.n4.nabble.com/test-to-see-if-a-s4-property-is-assigned-tp2541044p2541044.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list