% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/altrep.R
\name{shared_view}
\alias{shared_view}
\title{Create a view (subset) of a shared vector}
\usage{
shared_view(x, start, length)
}
\arguments{
\item{x}{A shard ALTREP vector}

\item{start}{Start index (1-based, like R)}

\item{length}{Number of elements}
}
\value{
An ALTREP view into the same shared memory
}
\description{
Create a view (subset) of a shared vector
}
\examples{
\donttest{
seg <- segment_create(800)
segment_write(seg, 1:100, offset = 0)
x <- shared_vector(seg, "integer", length = 100)

y <- shared_view(x, start = 10, length = 11)
y[1]
}
}
