Skip to content
Prev 333575 / 398506 Next

averaging rows on a data.frame according to a factor

Hello,

Try the following.

aggregate(cbind(V2, V3) ~ V1, dat, FUN = mean)


Hope this helps,

Rui Barradas

Em 22-11-2013 21:43, john d escreveu: