[R] Doing Mathematica Quantile[] function in R

Vihan Pandey vihanpandey at gmail.com
Thu Mar 8 07:08:45 CET 2012


Hi all,

I am an R newbie trying to do some calculations I do in Mathematica in
R on a GNU/Linux system.

The main thing I am interested in doing is taking a 0.999 quantile on
a data set in a file who's data is normally distributed, say foo.csv.

e.g in Mathematica if I have something like this :

a=Import["foo.csv"]
b=Transpose[a][[1]]
Quantile[b,0.999]

In R I can load all the data into b with :

scan("foo.csv") -> b

now, I can't find a function anywhere which would calculate the
Quantile on the dataset in b.

Any advice?

Also, I am guessing Mathematica does a lot of special things to ensure
a very accurate Quantile value, so if anyone has any ideas on
incorporating those as well, it would be great.

Thanks and Regards,

- vihan



More information about the R-help mailing list