Re: [Rd] "for" loop wiht S4 Objects

2009-01-23 Thread Douglas Bates
On Fri, Jan 23, 2009 at 1:25 AM, Biczok Rudolf wrote: > Hi all, > I'm working with the S4-Class system and I have a little problem with > Implementing iteration functionality in my S4 class but it don't work: >> setClass("foo",representation(bar="list")) >> x <- new("foo",bar=list(1,2,3)) >>for

[Rd] "for" loop wiht S4 Objects

2009-01-23 Thread Biczok Rudolf
Hi all, I'm working with the S4-Class system and I have a little problem with Implementing iteration functionality in my S4 class but it don't work: > setClass("foo",representation(bar="list")) > x <- new("foo",bar=list(1,2,3)) >for(e in x) cat(e) invalid type/length (S4/1) in ve