[R] tapply slow?

Thomas Lumley tlumley at u.washington.edu
Wed Jul 24 17:28:27 CEST 2002


On Wed, 24 Jul 2002, Meinhard Ploner wrote:

> If I call the function tapply
>
> tapply(x, fact, sum)
>
> with arguments of length 500000 the function works very slow.
> Is there an alternative to get the same results?
> The factor has about 100000 levels.
>

Yes. rowsum().

	-thomas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list