I was trying to develop a program in R to estimate a Spearman correlation with Rcpp. I did it, but it only works with matrix with less of a range between 45 00 - 50 000 vectors.
To repeat more succintly:
You can have more than 2^31-1 elements in a vector.
Matrices are vectors with dim
attributes.
You can have more than 2^31-1 elements in a matrix (ie n
times k
)
Your row and column index are still limited to 2^31.
Example of a big vector:
R> n <- .Machine$integer.max + 100
R> tmpVec <- 1:n
R> length(tmpVec)
[1] 2147483747
R> newVec <- sqrt(tmpVec)
R>