Learn R Programming

shard (version 0.1.0)

as.array.shard_buffer: Coerce a Shared Memory Buffer to Array

Description

Coerce a Shared Memory Buffer to Array

Usage

# S3 method for shard_buffer
as.array(x, ...)

Value

An array with the buffer contents and the buffer's dimensions, or a plain vector for 1-D buffers.

Arguments

x

A shard_buffer object.

...

Ignored.

Examples

Run this code
# \donttest{
buf <- buffer("double", dim = c(2, 3, 4))
as.array(buf)
buffer_close(buf)
# }

Run the code above in your browser using DataLab