R matrix handling expressions aren't evaluated in a function or a "for" loop - Column extract doesn't seem to work
- by Sal Leggio
I have an R matrix named ddd. When I enter this, everything works fine:
i <- 1
shapiro.test(ddd[,y])
ad.test(ddd[,y])
stem(ddd[,y])
print(y)
The calls to Shapiro Wilk, Anderson Darling, and stem all work, and extract the same column.
If I put this code in a "for" loop, the calls to Shapiro Wilk, and Anderson Darling stop working, while…