This question already has answers here:
Closed 5 years ago.
I'm just getting around to giving dplyr's chain operator a try.
Using the simple example:
group_by(mtcars, cyl) %>%
summarise(mean(disp), mean(hp))
I get the result:
# mean(disp) mean(hp)
#1 230.7219 146.6875
For some reason dplyr isn't grouping, just summarizing the entire vector. What am I missing?