I want to summarize a dataframe with dplyr, like so:
> test <-data.frame(ID = c(\"A\", \"A\", \"B\", \"B\"), val = c(1:4)) > test %>% group_by(ID
In older versions of dpylyr, You could use standard evaluation with dplyr::group_by_:
dpylyr
dplyr::group_by_
test %>% group_by_(names(.)[1]) %>% summarize(av = mean(val)) ## A tibble: 2 x 2 # ID av # #1 A 1.5 #2 B 3.5