Marshalling of 'bigmemory' objects
# S3 method for big.matrix
marshal(x, ...)
# S3 method for big.memory
marshallable(...)
A bigmemory::big.matrix object.
Not used.
A marshalled
object as described in marshal()
.
bigmemory::write.big.matrix()
is used to produce a marshalled version
of the original object.
bigmemory::read.big.matrix()
is used to reconstruct a version of the
original object from the marshalled object.
if (requireNamespace("bigmemory", quietly = TRUE)) {
library(bigmemory)
x <- big.matrix(nrow = 3, ncol = 2, type = "double")
x[] <- seq_along(x)
## Marshal
x_ <- marshal(x)
## Unmarshal
x2 <- unmarshal(x_)
stopifnot(identical(x2[], x[]))
}