On 2011-01-18 13:06, wangwallace wrote:
I tried it several times. it still gives me the same error.
I also used traceback()
here is what I got:
traceback()
3: `[.data.frame`(df, -s1$SubID, )
2: df[-s1$SubID, ]
1: crossed1(agr)
But I don't think there is anything wrong with it......
I think there is. Try this:
d <- data.frame(x=1:5, id1=5:1, id2=-2:2)
d
d[d$id1,]
d[-d$id1,}
d[-d$id2,]
So I think you'd better check your SubID contents.
It looks as though you're getting both positive and
negative values.
Peter Ehlers
______________________________________________
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.