[R] tapply with specific quantile value

From: Steven Ranney <steven.ranney_at_gmail.com>
Date: Thu, 24 Mar 2011 17:18:21 -0600


All -

I have an example data frame

x	l.c.1
43.38812035	085
47.55710661	085
47.55710661	085
51.99211429	085
51.99211429	095
54.78449958	095
54.78449958	095
56.70201864	095
56.70201864	105
59.66361903	105
61.69573564	105
61.69573564	105
63.77469479	115
64.83191994	115
64.83191994	115
66.98222118	115
66.98222118	125
66.98222118	125
66.98222118	125
66.98222118	125

and I'd like to get the 3rd quantile by l.c.1 so I use

tapply(x, l.c.1, quantile)

and my output includes all quantiles (i.e., 0, 25%, 50%, 75%, 100%) but I'm only interested in the 75% quantile. Is there an additional statement or function I can use to get just the quantile that I want?

Thanks for your help -

SR
Steven H. Ranney



R-help_at_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. Received on Thu 24 Mar 2011 - 23:54:50 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 Mar 2011 - 01:00:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive