I want to run some modelling on each group of variables a and b. The problem is that nest() doesn't include the grouping variables which are needed by the model.
expand.grid(a = LETTERS[1:3], b = LETTERS[1:2], c=1:3, d=1:3) %>%
group_by(a, b) %>%
nest()
The resulting table includes a and b on the "outside" and c and d in the nested tibble. How can I add a and b to the nested tibble?