% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/buffer.R
\name{[.shard_buffer}
\alias{[.shard_buffer}
\title{Extract Buffer Elements}
\usage{
\method{[}{shard_buffer}(x, i, j, ..., drop = TRUE)
}
\arguments{
\item{x}{A shard_buffer object.}

\item{i}{Index or indices.}

\item{j}{Optional second index (for matrices).}

\item{...}{Additional indices (for arrays).}

\item{drop}{Whether to drop dimensions.}
}
\value{
A vector or array of values read from the buffer.
}
\description{
Extract Buffer Elements
}
\examples{
\donttest{
buf <- buffer("double", dim = 10)
buf[1:5] <- 1:5
buf[1:3]
buffer_close(buf)
}
}
