I found this cool piece of code in the posit community but I cannot ask a follow up question so I am coming here.
I would like to get the adjusted r-squared value from this 'loop' but I cannot manage to do so, so I decided to ask the group. The code is the following.
library(tidyverse)
library(broom)
iris %>%
group_by(Species) %>%
do(tidy(lm(Sepal.Length ~ Sepal.Width, .))) %>%
filter(term != "(Intercept)")