View source: R/registerVariables.R
| registerVariables | R Documentation |
Given a namespace identifier (identifies the shared memory space to register to), this function allows you to allocate shared memory and copy data into it for other R sessions to access it.
registerVariables(namespace, variableList)
namespace |
string of the identifier of the shared memory context. |
variableList |
A named list of variables to register. Currently supported are matrices and vectors. |
No return value, called for allocation of memory pages.
Julian Maerte
releaseVariables, retrieveViews
library(memshare)
n = 10
m = 10
TargetMat= matrix(rnorm(n * m), n, m) # target matrix
x_vec = rnorm(n) # some other vector
namespace = "ns_register"
registerVariables(namespace, list(TargetMat=TargetMat, x_vec=x_vec))
memshare::releaseVariables(namespace, c("TargetMat", "x_vec"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.