Learn R Programming

shard (version 0.1.0)

as.matrix.shard_buffer: Coerce a Shared Memory Buffer to Matrix

Description

Coerce a Shared Memory Buffer to Matrix

Usage

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

Value

A matrix with the buffer contents and the buffer's dimensions.

Arguments

x

A shard_buffer object (must be 2-dimensional).

...

Ignored.

Examples

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

Run the code above in your browser using DataLab