# NOT RUN {
data(efc)
grpmean(efc, c12hour, e42dep)
data(iris)
grpmean(iris, Sepal.Width, Species)
# also works for grouped data frames
library(dplyr)
efc %>%
group_by(c172code) %>%
grpmean(c12hour, e42dep)
# }
Run the code above in your browser using DataLab