Alternatively,
see rowQuantiles() in the matrixStats package.
/Henrik
On Wed, Oct 6, 2010 at 10:34 PM, Joshua Wiley wrote:
> Hi,
>
> This should do it, for details, see ?apply
>
> a <- matrix(rnorm(1),100,100)
> t(apply(a, 1, quantile, probs = c(.3, .5)))
>
> Basically you apply() the quant
Hi,
This should do it, for details, see ?apply
a <- matrix(rnorm(1),100,100)
t(apply(a, 1, quantile, probs = c(.3, .5)))
Basically you apply() the quantile function to each row (the 1, 2
would indicate columns) in the object 'a'.
HTH,
Josh
On Wed, Oct 6, 2010 at 10:20 PM, Takos wrote:
>
Thanks all for your prompt and helpful replies!
Anjan
On Thu, Jan 22, 2009 at 11:52 AM, ANJAN PURKAYASTHA <
anjan.purkayas...@gmail.com> wrote:
> Hi,
> A simple quantile question:
> I need to calculate the 95% and 5% quantiles (aka percentiles) for the
> following data:
> 67.12
> 64.51
> 62.06
>
have a look at the online help file of ?quantile(); check also:
x <- c(67.12, 64.51, 62.06, 55.45, 51.41, 43.78, 10.74, 10.14)
sapply(1:9, function (i) quantile(x, c(0.05, 0.95), type = i))
I hope it helps.
Best,
Dimitris
ANJAN PURKAYASTHA wrote:
Hi,
A simple quantile question:
I need to ca
Read the help page for the quantile function (the whole page, there is a lot of
good detail in there), the 2nd reference on the page should also be a helpful
read.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Origin
5 matches
Mail list logo