arinbasu@softhome.net
2004-Apr-26 07:28 UTC
[R] Looking for help in calculating percentiles
Hi All: I am working with a dataset on Arsenic toxicity, and I am trying to calculate the 20th, 40th, 60th, 80th, and highest percentiles for a variable, dietary Moisture (variable name dMoist). The inbuilt function quantile(dMoist) would print 0, 25th, 50th, 75th, and 100th percentile. Does there exist a function that can calculate xth percentile (where x = 10th, 20th, ... etc) values? I looked for such functions in the documentation, but couldn't find one. Has anyone written a similar function that can be used? Is there a module or a function that I have missed? I use R in both Windows XP as well as Linux (Fedora Core 1 (Yarrow)) on a Duron I Gz machine with 128 MB RAM. Thanks in Advance, Arin Basu
> Hi All: > > I am working with a dataset on Arsenic toxicity, and I am trying to > calculate the 20th, 40th, 60th, 80th, and highest percentiles for a > variable, dietary Moisture (variable name dMoist).?quantile> quantile(rnorm(100),c(0.2,0.4,0.6,0.8,1))20% 40% 60% 80% 100% -1.0023956 -0.2448597 0.2846434 0.8926857 3.0120353
On Mon, 26 Apr 2004 01:28:58 -0600 arinbasu at softhome.net wrote:> Hi All: > > I am working with a dataset on Arsenic toxicity, and I am trying to > calculate the 20th, 40th, 60th, 80th, and highest percentiles for a > variable, dietary Moisture (variable name dMoist).Try ?quantile -- Detlef Steuer --- http://fawn.unibw-hamburg.de/steuer.html ***** Encrypted mail preferred ***** "Die herrschenden Ideen sind die Ideen der Herrschenden." --- K. Marx