[R] any suggestions on this error?
Uwe Ligges
ligges at statistik.tu-dortmund.de
Sat May 2 17:37:10 CEST 2009
onyourmark wrote:
> Error in matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow =
> nr, :
> invalid 'ncol' value (too large or NA)
>
> the statement was:
> for (i in v) {for (j in m[0,]){if(v[i]==m[0,j]){M[,-j]}}}
That code does not make sense at all:
- What is m[0,] ? Note that R starts counting at 1 ...
- You action is "M[,-j]", but that doe snot do anything except for
internally returning that matrix into the empty space.
So, if you tell us what you are really going to do, we might be able to
help better.
Uwe Ligges
>
> where 'v' is a vector, and 'm' and 'M' are both matrices.
More information about the R-help
mailing list