[R] Percentiles in R
Julian Burgos
jmburgos at u.washington.edu
Tue Sep 11 17:55:17 CEST 2007
Hola Jose Luis,
Sure, you can use quantile(). Use the probs argument. For example, to
get the median do
quantile(X,probs=0.5).
Do ?quantile to learn about the different type of quantiles calculated
by the funcion.
Saludos,
Julian
Jose Luis Aznarte M. wrote:
> Hi there! Still struggling to translate Matlab code into R's tsDyn package.
> Here is my question: Is there in R an equivalent function to Matlab's
> prctile()? To the moment I thought it was quantile(), but I just
> realized I was wrong. The definition of the Matlab function:
>
> prctile
> Percentiles of a sample
> SyntaxY = prctile(X,p)
> Description
> Y = prctile(X,p) calculates a value that is greater than p percent of
> the values in X. The values of p must lie in the interval [0 100]. For
> instance, if p = 50 then Y is the median of X
>
> Thanks!!
>
>
--
Julian M. Burgos
Fisheries Acoustics Research Lab
School of Aquatic and Fishery Science
University of Washington
1122 NE Boat Street
Seattle, WA 98105
Phone: 206-221-6864
More information about the R-help
mailing list