[R] eliminate t() and %*% using crossprod() and solve(A,b)

Katharine Mullen kate at few.vu.nl
Thu Oct 6 13:14:11 CEST 2005


you might want to see

Douglas Bates. Least squares calculations in R. R News,
4(1):17-20, June 2004.   http://CRAN.R-project.org/doc/Rnews/

he gives some rules of thumb, eg

use solve(A,b) not solve(A) %*% b
use crossprod(X) not t(X) %*% X
use crossprod(X,y) not t(X) y

----
Katharine Mullen
Department of Physics and Astronomy
Faculty of Sciences
Vrije Universiteit
de Boelelaan 1081
1081 HV Amsterdam
The Netherlands
room: T.1.06
tel: +31 205987870
fax: +31 205987992
e-mail: kate at nat.vu.nl
http://www.nat.vu.nl/~kate/




More information about the R-help mailing list