Hi,
 
Why doesn't this work?
 
setClass("test",representation(names="character"))
tmp <- new("test")
tmp@names <- "a"
 
Error in "slot<-"(object, name, TRUE, value) : 
        'names' attribute [1] must be the same length as the vector [0]
 
Why does this work (replace names with name)?
 
setClass("test",representation(name="character"))
tmp <- new("test")
tmp@name <- "a"
 
I looked at the help for setClass, representation, and slot and found no
restriction on the slot names other than that they "be any non-empty string,
but if the name is not made up of letters, numbers, and '"."', it needs to
be quoted".
 
Thanks,
Steve

	[[alternative HTML version deleted]]


