Learn R Programming

shard (version 0.1.0)

as.vector.shard_buffer: Coerce a Shared Memory Buffer to a Vector

Description

Coerce a Shared Memory Buffer to a Vector

Usage

# S3 method for shard_buffer
as.vector(x, mode = "any")

Value

A vector of the buffer's type (or coerced to mode).

Arguments

x

A shard_buffer object.

mode

Storage mode passed to as.vector.

Examples

Run this code
# \donttest{
buf <- buffer("double", dim = 5)
buf[1:5] <- 1:5
as.vector(buf)
buffer_close(buf)
# }

Run the code above in your browser using DataLab