Skip to content
Prev 286204 / 398502 Next

(no subject)

Hi
R's scale function is intended to do such things.

zt2 <- function(x) as.numeric(ifelse(is.nan(scale(x)), 0, scale(x)))

Regards
Petr
more
I
also
y=(x-mean
).
http://www.R-project.org/posting-guide.html