big.matrix-class | R Documentation |
The big.matrix
class is designed for matrices with
elements of type double
, integer
, short
, or char
.
A big.matrix
acts much like a traditional R matrix, but helps protect
the user from many inadvertent memory-consuming pitfalls of traditional R
matrices and data frames. The objects are allocated to shared memory,
and if file-backing is used they may exceed virtual memory in size. Sadly,
32-bit operating system constraints – largely Windows and some MacOS versions
–will be a limiting factor with file-backed matrices; 64-bit operating
systems are recommended.
Unlike many R objects, objects should not be created by calls of the form
new("big.matrix", ...)
. The functions big.matrix()
and filebacked.big.matrix()
are intended for the user.
address
:Object of class "externalptr"
points to the memory location of the C++ data structure.
As you would expect:
signature(x = "big.matrix", i = "ANY", j = "ANY")
: ...
signature(x = "big.matrix", i = "ANY", j = "missing")
: ...
signature(x = "big.matrix", i = "missing", j = "ANY")
: ...
signature(x = "big.matrix", i = "missing", j = "missing")
: ...
signature(x = "big.matrix", i = "matrix", j = "missing")
: ...
signature(x = "big.matrix", i = "ANY", j = "ANY", drop = "missing")
: ...
signature(x = "big.matrix", i = "ANY", j = "ANY", drop = "logical")
: ...
signature(x = "big.matrix", i = "ANY", j = "missing", drop = "missing")
: ...
signature(x = "big.matrix", i = "ANY", j = "missing", drop = "logical")
: ...
signature(x = "big.matrix", i = "matrix", j = "missing", drop = "logical")
: ...
signature(x = "big.matrix", i = "missing", j = "ANY", drop = "missing")
: ...
signature(x = "big.matrix", i = "missing", j = "ANY", drop = "logical")
: ...
signature(x = "big.matrix", i = "missing", j = "missing", drop = "missing")
: ...
signature(x = "big.matrix", i = "missing", j = "missing", drop = "logical")
: ...
The following are probably more interesting:
signature(x = "big.matrix")
: provide necessary and
sufficient information for the sharing or re-attaching of the object.
signature(x = "big.matrix")
: returns the dimension of the
big.matrix
.
signature(x = "big.matrix")
: returns the product of the
dimensions of the big.matrix
.
signature(x = "big.matrix", value = "list")
: set
the row and column names, prohibited by default (see bigmemory
to override).
signature(x = "big.matrix")
: get the row and column
names.
signature(x = "big.matrix")
: get the first 6 (or
n
) rows.
signature(x = "big.matrix")
: coerce a
big.matrix
to a matrix
.
signature(x = "big.matrix")
: return TRUE
if it's a big.matrix
.
signature(x = "big.matrix")
: return TRUE
if there is a file-backing.
signature(x = "big.matrix")
: return TRUE
if the big.matrix
is organized as a separated column vectors.
signature(x = "big.matrix")
: return
TRUE
if this is a sub-matrix of a big.matrix
.
signature(x = "big.matrix")
: returns the number of
columns.
signature(x = "big.matrix")
: returns the number of rows.
signature(x = "big.matrix")
: a traditional print()
is intentionally disabled, and returns head(x)
unless
options()$bm.print.warning==FALSE
; in this case, print(x[,])
is the result, which could be very big!
signature(x = "big.matrix")
: for
contiguous submatrices.
signature(x = "big.matrix")
: returns the last 6 (or
n
) rows.
signature(x = "big.matrix")
: return the type of the
atomic elements of the big.matrix
.
signature(bigMat = "big.matrix",
fileName = "character")
: produce an ASCII file from the big.matrix
.
signature(x = "big.matrix")
: apply()
where
MARGIN
may only be 1 or 2, but otherwise conforming to what you
would expect from apply()
.
Michael J. Kane and John W. Emerson bigmemoryauthors@gmail.com
big.matrix
showClass("big.matrix")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.