Ok, of course you were right. As Stefan pointed out, it was a problem of the type of the vector: it was a factor and hence the quantile was not what expected. Thank you all!!
Jose Luis Aznarte M. escribió: > 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!! > > -- -- -- Jose Luis Aznarte M. http://decsai.ugr.es/~jlaznarte Department of Computer Science and Artificial Intelligence Universidad de Granada Tel. +34 - 958 - 24 04 67 GRANADA (Spain) Fax: +34 - 958 - 24 00 79 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.