Chien-Pang Chin
2010-Sep-15 21:22 UTC
[R] loop, list() and non-numeric argument to binary operator
Hi all: I have a problem when I want to do operation a sequence or matrix created by loop and list() or data.frame(). Here is the example.> for(i in 1:n) (k[i]=list(c(0:max[i])))> k[1]+1Error in k[1] + 1 : non-numeric argument to binary operator What should I do to correct this problem? Thanks Peter [[alternative HTML version deleted]]
Chien-Pang Chin
2010-Sep-15 21:35 UTC
[R] loop, list() and non-numeric argument to binary operator
Hi all: I have a problem when I want to do operation a sequence or matrix created by loop and list() or data.frame(). Here is the example.> for(i in 1:n) (k[i]=list(c(0:max[i])))> k[1]+1Error in k[1] + 1 : non-numeric argument to binary operator What should I do to correct this problem? Thanks Peter [[alternative HTML version deleted]]