I am following an example at KhanAcademy.com regarding box plots.
I tried to simulate the question in R with the following code
x <- c(13,9,11,8,8,12,9,9,4,12,10,8,11)
summary(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
4.000 8.000 9.000 9.538 11.000 13.000
Sal of KA stated that there are two ways of getting the quadrilles the difference being whether one factors in the median when computing the 1st and 3rd quartile.
Is there a way to tell the summary function you want to exclude the median when computing the other quartiles.
The answer if this approach is taken would be
Min. 1st Qu. Median Mean 3rd Qu. Max.
4.000 8.000 9.000 9.538 *11.500* 13.000
How come there isn't an agreed method on how to tackle such problems?