Calculate the quantiles of an lvec
# S3 method for lvec
quantile(
x,
probs = seq(0, 1, 0.25),
names = TRUE,
na.rm = TRUE,
true_probs = FALSE,
...
)an object of type lvec.
a numeric vector with probabilities ([0,1]).
add names to the result vector.
remove missing values before calculating the quantiles
add an attribute with the probabilities at the chosen pivots.
ignored.
This function uses a more simple method than that used by the regular
quantile method. It sorts the vector (using
partial_sort for speed) and selects elements from x
that correspond to the given probabilities. For example, when x has
length of 11 and prob equal to 0.5, it selects the 6th element from
the (partially) sorted x. For large enough vectors this is a
reasonable approach.