I'm plotting a simple boxplot of two group's weight by year based on big data (2150000 cases). All groups have the same median except for the last group in the last year but on the boxplot, it is drawn like it is the same as every other.
#boxplot
ggplot(dataset, aes(x=Year, y=SUM_MME_mg, fill=GenderPerson)) +
geom_boxplot(outlier.shape = NA)+
ylim(0,850)
#median by group
pivot <- dataset %>%
select(SUM_MME_mg,GenderPerson,Year )%>%
group_by(Year, GenderPerson) %>%
summarise(MedianValues = median(SUM_MME_mg,na.rm=TRUE))
I can't figure out what I am doing wrong or which data is more accurate in boxplot calculations or median function. R returns no error or warning.
#my data:
> dput(head(dataset[,c(1,7,10)]))
structure(list(GenderPerson = c(2L, 1L, 2L, 2L, 2L, 2L), Year = c("2015",
"2014", "2013", "2012", "2011", "2015"), SUM_MME_mg = c(416.16,
131.76, 790.56, 878.4, 878.4, 878.4)), row.names = c(NA, 6L), class = "data.frame")

