Last active
February 27, 2020 15:27
-
-
Save cddesja/5537dd232e661f25f1e24ca276fd6801 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
# untidyverse | |
# this one is sooooooo hard to type | |
an.agg <- aggregate(bmi ~ an_j + months, | |
FUN = function(x) c(m = mean(x), n = n(x)), | |
data = an.l) | |
# tidyverse | |
# this one makes my fingers sing | |
bmi %>% | |
group_by(an_j) %>% | |
summarize(m = mean, | |
n = n) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment