Hi, I'd like to create a S4 class contains only one type of data.
However, the number of slots varies.
For example, I want to create a class "a", each slots in "a" contains
numeric value only.
> setClass("a", contains = "numeric")
If I want to create an object "a" with only one slot containing c(3,4),
I will write
> new("a", c(3,4))
What if I want to create another object "a" with three slots with c(3,4)
in the 1st slot, c(1,2) in the second, and c(0, 5) in the third?
Arthur Xuejun Li
Division of Information Science
1500 East Duarte Road
Duarte, CA 91010 - 3000
Ph: (626) 256-4673 ext. 65121
Fax: (626) 471-7106
---------------------------------------------------------------------
SECURITY/CONFIDENTIALITY WARNING: \ This message an...{{dropped:23}}
______________________________________________
[email protected] 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.