quantile {stats} | R Documentation |
The generic function quantile produces sample quantiles corresponding
to the given probabilities. The smallest observation corresponds to
a probability of 0 and the largest to a probability of 1.
quantile(x,
probs = [0.25,0.5,0.75,1]);
A vector of length length(probs) is returned; if names = TRUE, it has a names attribute. NA And NaN values in probs are propagated to the result. The Default method works With classed objects sufficiently Like numeric vectors that sort And (Not needed by types 1 And 3) addition Of elements And multiplication by a number work correctly. Note that As this Is In a Namespace, the copy Of sort In base will be used, Not some S4 generic Of that name. Also note that that Is no check On the 'correctly’, and so e.g. quantile can be applied to complex vectors which (apart from ties) will be ordered on their real parts. There Is a method for the date-time classes (see "POSIXt"). Types 1 And 3 can be used for class "Date" And for ordered factors.