SharedObject: Create an empty shared object

View source: R/SharedObject.R

SharedObjectR Documentation

Create an empty shared object

Description

Create an empty shared object with a specific length and attributes.

Usage

SharedObject(
  mode = c("raw", "logical", "integer", "numeric", "complex"),
  length,
  attrib = list(),
  ...
)

Arguments

mode

the type of the shared object

length

the length of the shared object

attrib

the attributes of the shared object

...

Parameters that is used to create the shared object, please refer to ?share for details.

Value

An R vector

Examples

## Create an empty shared vector
x1 <- SharedObject(mode = "numeric", length = 10)
x1
## Create an empty shared matrix
x2 <- SharedObject(mode = "numeric", length = 6,
                 attrib = list(dim = c(2L,3L)))
x2

Jiefei-Wang/SharedObject documentation built on June 8, 2024, 1:35 a.m.