On 09/15/2010 12:03 PM, darckeen wrote:
> 
> Class("person",representation(age="numeric",weight="numeric"))
> [1] "person"
>> bob <- new("person",age=30)
>> is.null(b...@weight)
> [1] FALSE
>> b...@weight
> numeric(0)
>> b...@weight == numeric(0)
> logical(0)

Hi darckeen -- use the prototype argument to setClass to assign a
default value, and test for that. Martin

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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to