[R] Alternative to apply in base R

Doran, Harold HDoran at air.org
Tue Nov 8 16:57:51 CET 2016

Without reaching out to another package in R, I wonder what the best way is to speed enhance the following toy example? Over the years I have become very comfortable with the family of apply functions and generally not good at finding an improvement for speed.

This toy example is small, but my real data has many millions of rows and the same operations is repeated many times and so finding a less expensive alternative would be helpful.

mm <- matrix(rnorm(100), ncol = 10)
rn <- apply(mm, 1, prod)

	[[alternative HTML version deleted]]

More information about the R-help mailing list