Is there a way to instruct dplyr to use summarise_each with na.rm=TRUE? I would like to take the mean of variables with summaris
dplyr
summarise_each
na.rm=TRUE
summaris
Take for instance mtcars data set
mtcars
library(dplyr)
You can always use summarise to avoid long syntax:
summarise
mtcars %>% group_by(cyl) %>% summarise(mean_mpg = mean(mpg, na.rm=T), sd_mpg = sd(mpg, na.rm = T))