Dear R users,
I have a newbie-question that I couldn't resolve after reading through
several pieces of documentation and searching the archive.
I have a data.frame containing experimental data from a group experiment
in psychology. Each line represents a single participant, but
participants
something like that should work :
aggregate(test, list(test[,1]), mean)
2008/8/1 Bertolt Meyer [EMAIL PROTECTED]
Dear R users,
I have a newbie-question that I couldn't resolve after reading through
several pieces of documentation and searching the archive.
I have a data.frame containing
Hi Bertolt,
by(test,INDICES=test$groupID,FUN=mean)
And today's a holiday in Switzerland, so stop working already ;-)
HTH
Stephan
Bertolt Meyer schrieb:
Dear R users,
I have a newbie-question that I couldn't resolve after reading through
several pieces of documentation and searching the
one option is aggregate(), e.g.,
test - as.data.frame(cbind(c(rep(1,5),rep(2,5)), rnorm(10), rnorm(10)))
names(test)[1] - groupID
aggregate(test[c(V2, V3)], list(test$groupID), mean)
I hope it helps.
Best,
Dimitris
--
Dimitris Rizopoulos
Biostatistical Centre
School of Public Health
Catholic
4 matches
Mail list logo