Creating Basic Charts with ggplot2
Code Example 4
Code
10 / 11
Code Example 4
Code
Code Example 4
r
prepared_data |>
ggplot(aes(x = site, y = age_years_derived)) +
geom_boxplot() +
coord_flip() +
labs(
title = "Age Distribution by Site",
x = "Site",
y = "Age, years"
)