group by tidyverse summarize retain all columns code example
Example: how to summarise data but keep columns R
data %>%
group_by(b) %>%
mutate(min_values = min(c)) %>%
ungroup()
data %>%
group_by(b) %>%
mutate(min_values = min(c)) %>%
ungroup()