Learn R Programming

shard (version 0.1.0)

[.shard_buffer: Extract Buffer Elements

Description

Extract Buffer Elements

Usage

# S3 method for shard_buffer
[(x, i, j, ..., drop = TRUE)

Value

A vector or array of values read from the buffer.

Arguments

x

A shard_buffer object.

i

Index or indices.

j

Optional second index (for matrices).

...

Additional indices (for arrays).

drop

Whether to drop dimensions.

Examples

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

Run the code above in your browser using DataLab