matter_str-class | R Documentation |
The matter_str
class implements out-of-memory strings.
## Instance creation
matter_str(data, encoding, path = NULL,
nchar = NA_integer_, names = NULL, offset = 0, extent = NA_real_,
readonly = NA, append = FALSE, ...)
## Additional methods documented below
data |
An optional data vector which will be initially written to virtual memory if provided. |
encoding |
The character encoding to use (if known). |
path |
A 'character' vector of the path(s) to the file(s) where the data are stored. If |
nchar |
A vector giving the length of each element of the character vector. |
names |
The names of the data elements. |
offset |
A vector giving the offsets in number of bytes from the beginning of each file in 'path', specifying the start of the data to be accessed for each file. |
extent |
A vector giving the length of the data for each file in 'path', specifying the number of elements of size 'type' to be accessed from each file. |
readonly |
Whether the data and file(s) should be treated as read-only or read/write. |
append |
If |
... |
Additional arguments to be passed to constructor. |
An object of class matter_str
.
data
:This slot stores any information necessary to access the data for the object (which may include the data itself and/or paths to file locations, etc.).
type
:The storage mode of the accessed data when read into R. This is a 'factor' with levels 'raw', 'logical', 'integer', 'numeric', or 'character'.
dim
:Either 'NULL' for vectors, or an integer vector of length one of more giving the maximal indices in each dimension for matrices and arrays.
names
:The names of the data elements for vectors.
dimnames
:Either 'NULL' or the names for the dimensions. If not 'NULL', then this should be a list of character vectors of the length given by 'dim' for each dimension. This is always 'NULL' for vectors.
encoding
:The string encoding used.
matter_list
matter_str
instances can be created through matter_str()
or matter()
.
Standard generic methods:
x[i], x[i] <- value
:Get or set the string elements of the vector.
lengths(x)
:Get the number of characters (in bytes) of all string elements in the vector.
Kylie A. Bemis
matter
x <- matter_str(rep(c("hello", "world!"), 50))
x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.