marshal.big.matrix | R Documentation |
Marshalling of 'bigmemory' objects
## S3 method for class 'big.matrix'
marshal(x, ...)
## S3 method for class 'big.memory'
marshallable(...)
x |
A bigmemory::big.matrix object. |
... |
Not used. |
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.
A marshalled
object as described in marshal()
.
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[]))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.