Skip to content
Prev 87319 / 398502 Next

Elegant way to express residual calculation in R?

Here is one further idea:

Xm <- as.matrix(X)
Xm. <- scale(Xm, scale = FALSE)
Xm.. <- t(scale(t(tmp), scale = FALSE))
sum(Xm..^2)
On 2/27/06, Gabor Grothendieck <ggrothendieck at gmail.com> wrote: