I have the following data (ordered):
$$0, 1, 1, 2, 3, 4, 4, 7, 9, 23.$$
As far as I know, $Q_1 \text{(median of the upper half)} = 1$; $Q_3 \text{(median of the lower half)} = 7$; Therefore, $\text{IQR} = Q_3-Q_1 = 6$.
But when I boxplot this simple data in 'R', the summary says that, $Q_1 = 1.25$, $Q_3 = 6.25$, and consequently, $\text{IQR} = 6.25-1.25 = 5$!! How is that? I don't think we can question the statistical computation by "R" anyway ... Can anyone tell me what is wrong?