The matter
package defines a number of data types for translating between data elements stored in virtual memory and data elements loaded into R. These are typically set and stored via the datamode
argument and slot.
At the R level, matter
objects may be any of the following data modes:
raw
:matter
objects of this mode are typically vectors of raw bytes.
logical
:Any matter
object that represents a logical vector or has had any Compare or Logic delayed operations applied to it will be of this type.
integer
:matter
objects represented as integers in R.
numeric
:matter
objects represented as doubles in R.
character
:matter
objects representated as character vectors in R.
virtual
:A number of matter
objects do not necessarily represent out-of-memory data, or may include a number of components mixed between virtual memory and real memory; these will use this data mode.
In virtual memory, matter
objects may be composed of atomic units of the following data types:
char
:8-bit signed integer; defined as char
.
uchar
:8-bit unsigned integer; used for ‘Rbyte’ or ‘raw’; defined as unsigned char
.
short
:16-bit signed integer; defined as int16_t
.
ushort
:16-bit unsigned integer; defined as uint16_t
.
int
:32-bit signed integer; defined as int32_t
.
uint
:32-bit unsigned integer; defined as uint32_t
.
long
:64-bit signed integer; defined as int64_t
.
ulong
:64-bit unsigned integer; defined as uint64_t
.
float
:Platform dependent, but usually a 32-bit float; defined as float
.
double
:Platform dependent, but usually a 64-bit float; defined as double
.
While a substantial effort is made to coerce data elements properly between data types, sometimes this cannot be done losslessly. This will generate a warning (typically many such warnings) that can be silenced by setting options(matter.cast.warning=FALSE)
.
Note that the unsigned data types do not support NA
; coercion to signed short
and long
attempts to preserve missingness. The special values NaN
, Inf
, and -Inf
are only supported by the floating-point types, and will be set to NA
for signed integral types, and to 0
for unsigned integral types.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.