[R] Error in vector("integer", length) : vector size cannot be NA
mathijsdevaan
mathijsdevaan at gmail.com
Thu Dec 9 05:12:34 CET 2010
Hello,
I have uploaded a csv file that looks like this:
> gc
alpha_id beta_id
1 142053 1
2 9454 1
3 295618 2
4 42691 2
5 389224 3
6 9455 3
The alpha_id contains 310660 unique values and the beta_id contains 17431
unique values. The number of rows adds up to more than 1.3 million. Now I
want to convert this list of observations into a matrix with alpha_id in the
first row and beta_id in the first column (or vice versa) and a count in the
cells. So this would be an option M = as.matrix( table(gc) ). However, I
keep getting this error message:
Error in vector("integer", length) : vector size cannot be NA
In addition: Warning messages:
1: In pd * (as.integer(cat) - 1L) : NAs produced by integer overflow
2: In pd * nl : NAs produced by integer overflow
There is no missing data in my file, so I don't know what's wrong. Can you
please help me? Thanks!
Mathijs
--
View this message in context: http://r.789695.n4.nabble.com/Error-in-vector-integer-length-vector-size-cannot-be-NA-tp3079566p3079566.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list