[R] Vectors of S4 Classes

From: Phineas <phineas_at_blueyonder.co.uk>
Date: Tue 06 Dec 2005 - 06:58:17 EST


I have a function from which I wish to return two vectors of equal length of a class

eg
> setClass("ClassOne", representation(x="numeric"))
[1] "ClassOne"
> first<-new("ClassOne", x=1)
> second<-new("ClassOne",x=2)
> first<-rbind(first,second)
> first

first
second

Is it possible to create vector or list of an S4 class?

Phineas

> version

         _
platform i386-pc-mingw32

arch     i386
os       mingw32

system i386, mingw32
status
major 2
minor 1.0
year 2005
month 04
day 18
language R

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Dec 06 07:11:15 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:28 EST