John Sorkin wrote:
R 2.8.0
windows XP
I would like to divide the rows of data frame into five groups and then get the
mean of one column within the five groups. I have accomplished this using the
code below, but I hope there is an easier way, i.e. some function that I can
call
# create five
discussurus
-
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von John Sorkin
Gesendet: Wednesday, December 10, 2008 11:09 PM
An: r-help@r-project.org
Betreff: [R] means of a column within groups of a data frame
R 2.8.0
windows XP
R 2.8.0
windows XP
I would like to divide the rows of data frame into five groups and then get the
mean of one column within the five groups. I have accomplished this using the
code below, but I hope there is an easier way, i.e. some function that I can
call
# create five groups.
cut(data$BMI,
3 matches
Mail list logo