Hi there,

I'm having a problem when trying to create a large matrix (1,000,000 x
1,000,000) of the .csr type (package 'SparseM').
> k <- rep(0,1000000)
> tmp <- length(k)
> tmp2 <- as.matrix.csr(0,tmp,tmp)
Error in if (length(x) == nrow * ncol) x <- matrix(x, nrow, ncol) else { :
  missing value where TRUE/FALSE needed
Warning message:
In nrow * ncol : NAs produced by integer overflow

Curiously, if I run these other commands, it works fine.
> tmp <- 1000000
> tmp2 <- as.matrix.csr(0,tmp,tmp)

Please, what am I doing wrong?

Thanks in advance.
Jose

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to