I´m having some troubles trying to extract into a table the five number values of a geom_boxplot
. I know it works easily with boxplot$stats, however, I cannot find the way to extract the same information from a boxplot made in ggplot2
. Can anyone help me?
this is the code of the graph:
graf332 <- bd %>%
filter(!(DIAGNOST %in% c("Otras Enf eosinofilicas del TGI", "Esofagitis Eosinofilica"
))) %>%
ggplot(aes(x = DIAGNOST, y = EDAD, fill = SEXO)) +
geom_boxplot() +
scale_fill_hue() +
labs(x = "Diagnóstico", y = "Edad en meses",
title = "Distribución de la población por diagnóstico según edad en meses y discriminado por sexo",
fill = "Sexo") +
theme_minimal()