You may be interested in the fastLM function from the RcppArmadillo package

On Mon, Nov 21, 2011 at 9:52 PM, Robert A'gata <rhelpacc@gmail.com> wrote:

> Hi,
>
> I think my problem is a bit mundane but it's quite intriguing. Imagine
> I have a matrix of 10 by 2 million. The first 5 columns are x and the
> last 5 are y values. I have to regress y on x (assume 0 intercept) for
> each row to observe time series of the slope. I am wondering if there
> is any way to speed this calculation up? I tried with apply. But it is
> still slow. Is there any trick I should know? Thank you.
>
> Robert
>
> _______________________________________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>

	[[alternative HTML version deleted]]

