matter-class {matter} | R Documentation

## Vectors, Matrices, and Arrays Stored in Virtual Memory

### Description

The `matter` class and its subclasses are designed for easy on-demand read/write access to binary virtual memory data structures, and working with them as vectors, matrices, arrays, lists, and data frames.

### Usage

    ## Instance creation
    matter(...)

    # Check if an object is a matter object
    is.matter(x)

    # Coerce an object to a matter object
    as.matter(x, ...)

    ## Additional methods documented below

### Arguments

`...` | Arguments passed to subclasses.
`x` | An object to check if it is a matter object or coerce to a matter object.

### Value

An object of class `matter`.

### Slots

`data`:

  This slot stores the information about locations of the data in virtual memory and within files.

`datamode`:

  The storage mode of the accessed data when read into R. This is a 'character' vector of with possible values 'raw', 'logical', 'integer', 'numeric', or 'virtual'.

`paths`:

  A 'character' vector of the paths to the files where the data are stored.

`filemode`:

  The read/write mode of the files where the data are stored. This should be 'r' for read-only access, or 'rw' for read/write access.

`chunksize`:

  The maximum number of elements which should be loaded into memory at once. Used by methods implementing summary statistics and linear algebra. Ignored when explicitly subsetting the dataset.

`length`:

  The length of the data.

`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.

`ops`:

  Delayed operations to be applied on atoms.

### Creating Objects

`matter` is a virtual class and cannot be instantiated directly, but instances of its subclasses can be created through `matter()`.

### Methods

Class-specific methods:

`atomdata(x)`:

  Access the 'data' slot.

`adata(x)`:

  An alias for atomdata(x).

`datamode(x), datamode(x) <- value`:

  Get or set 'datamode'.

`paths(x), paths(x) <- value`:

  Get or set 'paths'.

`filemode(x), filemode(x) <- value`:

  Get or set 'filemode'.

`readonly(x), readonly(x) <- value`:

  A shortcut for getting or setting 'filemode'.

`chunksize(x), chunksize(x) <- value`:

  Get or set 'filemode'.

Standard generic methods:

`length(x), length(x) <- value`:

  Get or set 'length'.

`dim(x), dim(x) <- value`:

  Get or set 'dim'.

`names(x), names(x) <- value`:

  Get or set 'names'.

`dimnames(x), dimnames(x) <- value`:

  Get or set 'dimnames'.

### Author(s)

Kylie A. Bemis

### See Also

`matter_vec`, `matter_mat`, `matter_arr`, `matter_list`, `matter_fc`, `matter_str`, `matter_df`

### Examples

    ## Create a matter_vec vector
    x <- matter(1:100, length=100)
    x

    ## Create a matter_mat matrix
    x <- matter(1:100, nrow=10, ncol=10)
    x

[Package matter version 1.20.0 Index]