Learn R Programming

Rdsm (version 2.1.1)

mgrmakevar: Create an Rdsm shared variable.

Description

Creates an Rdsm shared variable.

Usage

mgrmakevar(cls,varname,nr,nc,vartype="double",fs=FALSE,mgrcpy=TRUE,savedesc=TRUE)

Arguments

cls
The parallel cluster.
varname
Name of the shared variable, quoted. (The variable must be a matrix, though it could be 1x1 etc.)
nr
Number of rows in the variable.
nc
Number of columns in the variable.
vartype
Atomic R type of the variable, quoted, "double" by default.
fs
Place in backing store? FALSE by default.
mgrcpy
Place a copy of the shared variable on the manager node? TRUE by default.
savedesc
Save the bigmemory descriptor for this variable on disk.

Details

Run this from the manager (the R process from which you create the cluster). The shared variable will be created, readable/writable from all threads. The variable will be of class big.matrix; see the library bigmemory for details.