I would like to get the slope of a linear regression fit for 1M separate data sets (1M * 50 rows for data.frame, or 1M * 50 for array). Now I am using the lm()
lm()
Since 3.1.0 there is a .lm.fit() function. This function should be faster than lm() and lm.fit().
.lm.fit()
lm.fit()
It's described and its performance is compared with different lm functions here - https://rpubs.com/maechler/fast_lm.
lm