Question
Following on from this question that asked about different quantile types, is it possible to change the type argument for quantile when using the summary() function?
For example, taking the dataset
d <- c(11, 4, 1, 4, 2, 2, 6, 10, 5, 6, 0, 6, 3, 3)
I'm happy that
quantile(d, probs=0.25, type=6)
and
quantile(d, probs=0.25, type=7)
produce different results, and that the default type used in summary is type=7. Is it possible to tell summary to use type=6?
Notes / Output
quantile(d, probs=0.25, type=6)
25%
2
quantile(d, probs=0.25, type=7)
25%
2.25
summary(d)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.00 2.25 4.00 4.50 6.00 11.00
Building on akrun's idea, you could modify
summary.defaultAnd now the
typeis 6 by defaultAnd
mySummarystill maintains the properties of asummary.defaultobject