Skip to content
Prev 180489 / 398525 Next

Help with loops

I'm not quite sure what you want to do, but this might help:

d=data.frame(replicate(40, rnorm(20)))
d$sample=rep(c('a','b','c','d'),each=5)
lib(doBy)
summaryBy(.~sample,da=d)

David Freedman
Amit Patel-7 wrote: