dplyr group by summarize keep 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()