powered by
Convenience function that creates a segment, writes the data, and returns an ALTREP view.
as_shared(x, readonly = TRUE, backing = "auto", cow = NULL)
An ALTREP vector backed by shared memory
An atomic vector (integer, double, logical, or raw)
If TRUE, prevent write access (default: TRUE)
Backing type for the segment: "auto", "mmap", or "shm"
Copy-on-write policy for the resulting shared vector. One of "deny", "audit", or "allow". If NULL, defaults based on readonly.
"deny"
"audit"
"allow"
readonly
# \donttest{ x <- as_shared(1:100) is_shared_vector(x) y <- x[1:10] is_shared_vector(y) # }
Run the code above in your browser using DataLab