However, you can combine the first two steps into one by creating the grouping variable inside group_by with the following syntax: penguins %>% group_by(StudyName = penguins_raw$studyName) %>% summarise(mean_body_mass = mean(body_mass_g, na.rm = TRUE))...
These all combine naturally with group_by() which allows you to perform any operation “by group”. You can learn more about them in vignette("dplyr"). As well as these single-table verbs, dplyr also provides a variety of two-table verbs, which you can learn about in vignette("two-...