]>
Commit | Line | Data |
---|---|---|
1d09f67e TL |
1 | % Generated by roxygen2: do not edit by hand |
2 | % Please edit documentation in R/buffer.R | |
3 | \docType{class} | |
4 | \name{buffer} | |
5 | \alias{buffer} | |
6 | \alias{Buffer} | |
7 | \title{Buffer class} | |
8 | \usage{ | |
9 | buffer(x) | |
10 | } | |
11 | \arguments{ | |
12 | \item{x}{R object. Only raw, numeric and integer vectors are currently supported} | |
13 | } | |
14 | \value{ | |
15 | an instance of \code{Buffer} that borrows memory from \code{x} | |
16 | } | |
17 | \description{ | |
18 | A Buffer is an object containing a pointer to a piece of | |
19 | contiguous memory with a particular size. | |
20 | } | |
21 | \section{Factory}{ | |
22 | ||
23 | \code{buffer()} lets you create an \code{arrow::Buffer} from an R object | |
24 | } | |
25 | ||
26 | \section{Methods}{ | |
27 | ||
28 | \itemize{ | |
29 | \item \verb{$is_mutable} : is this buffer mutable? | |
30 | \item \verb{$ZeroPadding()} : zero bytes in padding, i.e. bytes between size and capacity | |
31 | \item \verb{$size} : size in memory, in bytes | |
32 | \item \verb{$capacity}: possible capacity, in bytes | |
33 | } | |
34 | } | |
35 | ||
36 | \examples{ | |
37 | \dontshow{if (arrow_available()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} | |
38 | my_buffer <- buffer(c(1, 2, 3, 4)) | |
39 | my_buffer$is_mutable | |
40 | my_buffer$ZeroPadding() | |
41 | my_buffer$size | |
42 | my_buffer$capacity | |
43 | \dontshow{\}) # examplesIf} | |
44 | } |