I’ve plotted a boxplot for PM2.5 levels per year.
Boxplot(PM2.5~year, data=subset(dat, hour==12), las=1)
How can I extract values such as the median from the boxplots?
I’ve plotted a boxplot for PM2.5 levels per year.
Boxplot(PM2.5~year, data=subset(dat, hour==12), las=1)
How can I extract values such as the median from the boxplots?
Copyright © 2021 Jogjafile Inc.
The default
boxplot
function returns summaries invisibly, you just have to assign it to a variable:Within
res
there exists an elementstats
:These are quartile summaries of the boxes. The median is the middle one, so: