library(gapminder)
%>%
gapminder group_by(continent) %>%
filter(year == max(year)) %>%
summarise(mean = mean(gdpPercap),
sd = sd(gdpPercap))
# A tibble: 5 × 3
continent mean sd
<fct> <dbl> <dbl>
1 Africa 3089. 3618.
2 Americas 11003. 9713.
3 Asia 12473. 14155.
4 Europe 25054. 11800.
5 Oceania 29810. 6541.