When using dplyr\'s \"group_by\" and \"mutate\", if I understand correctly, the data frame is split in different sub-dataframes according to the group_by argument. For examp
We can use within do
do
data %>% group_by(let ) %>% do(mutate(., mean.by.letter = mean(.$x)))