Dear all, Why the transform function does not accept two statistics
functions?
a = data.frame(matrix(rnorm(20),ncol=2))
transform(a,M.1=mean(X1),M.2=mean(X2)) # does not works
#while:
transform(a,M.1=mean(X1),M2=log(abs(X2))) #works
Best regards
JL
lamack lamack wrote:
Dear all, Why the transform function does not accept two statistics
functions?
a = data.frame(matrix(rnorm(20),ncol=2))
transform(a,M.1=mean(X1),M.2=mean(X2)) # does not works
#while:
transform(a,M.1=mean(X1),M2=log(abs(X2))) #works
It's a variation of this