[R] Python and R

Doran, Harold HDoran at air.org
Wed Feb 18 15:21:41 CET 2009


> lm(y ~ x-1)
> solve(crossprod(x), t(x))%*%y    # probably this can be done more
> efficiently


You could do

crossprod(x,y) instead of t(x))%*%y




More information about the R-help mailing list