spam (version 2.5-1)

large_matrix: Large 64-bit matrices require the R package spam64

Description

The R package spam can handle sparse matrices with up to 2^31-1 non-zero elements. For matrices with more non-zero elements it is necessary to load the spam64 package in addition.

Arguments

Details

With the help of the R package dotCall64 spam interfaces either the compiled code with 32-bit integers provided in spam or the compiled code with 64-bit integers provided in spam64.

References

F. Gerber, K. Moesinger, R. Furrer (2017), Extending R packages to support 64-bit compiled code: An illustration with spam64 and GIMMS NDVI3g data, Computer & Geoscience 104, 109-119, https://doi.org/10.1016/j.cageo.2016.11.015.

See Also

spam64-package, dotCall64.

Examples

Run this code
# NOT RUN {
## the following matrices are very large, and hence, 
## require much memory and cpu time.
library("spam64")
s1 <- spam(1, ncol=2^30)        # 32-bit matrix
s1

s2 <- cbind(s1, s1)             # 64-bit matrix
s2

s3 <- spam(1, ncol=2^31)        # 64-bit matrix
s3
# }

Run the code above in your browser using DataLab