Last active
October 14, 2015 05:56
-
-
Save t-student/40d353ad3b757f43a805 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a data frame from a grouped summary of a response variable | |
library(plyr) | |
df <- ddply(df1, .(age.level, gender), summarise, m.mean = mean(sbp), s.sum = sum(sbp)) | |
# age.level gender m.mean s.sum | |
# 1 age<40 Female 131.1082 786.6491 | |
# 2 age<40 Male 134.8499 539.3997 | |
# 3 age>=40 Female 142.3465 711.7324 | |
# 4 age>=40 Male 143.8150 1294.3354 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment