[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ess-help
Subject:    Re: [ESS] problems with generation of quantiles under For ()
From:       "RICHARD M. HEIBERGER" <rmh () temple ! edu>
Date:       2010-05-16 21:54:28
Message-ID: AANLkTinreI9LPIP6Z0c9Op9Sd8gs3tDT2g7jA6PHXADc () mail ! gmail ! com
[Download RAW message or body]

Agustín,

This looks more like an R-help question, than an ESS question.
It should be on the R-help list r-help@r-project.org

I will answer what I think is your question.  It looks to me more like
a situation for apply than for For.

Next time please send an example that can be picked up from the
email and dropped directly into R.

x <- matrix(sample(10, 30, replace=TRUE), 6,5)

apply(x, 2, quantile,
       probs = c(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)/100,
       na.rm=FALSE, type=1)

See
?apply
for details.


Rich

	[[alternative HTML version deleted]]



______________________________________________
ESS-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic