| deepcopy {bigmemory} | R Documentation |
This is needed to make a duplicate of a big.matrix; currently,
it creates a non-shared big.matrix regardless of the nature
of the argument, and this will be changed to support additional options.
deepcopy(x, cols = NULL, type = NULL, separated = NULL, shared = NULL,
backingfile = NULL, backingpath = NULL, descriptorfile = NULL,
preserve = TRUE)
x |
a big.matrix. |
cols |
possible subset of columns for the deepcopy, could be numeric, named, or logical. |
type |
preferably specified, "integer" for example. |
separated |
use separated column organization of the data instead of column-major organization. |
shared |
if TRUE, load the object into shared memory. |
backingfile |
the root name for the file(s) for the cache of x. |
backingpath |
the path to the directory containing the file backing cache. |
descriptorfile |
we recommend specifying this for filebacking. |
preserve |
if this is a filebacked big.matrix, it is preserved, by default, even after the end of the R session unless this option is set to FALSE. |
This is needed to make a duplicate of a big.matrix, because traditional
R syntax would only copy the R object (the pointer to the big.matrix
rather than the big.matrix itself).
It can also make a copy of only a subset of columns.
a big.matrix.
John W. Emerson and Michael J. Kane
x <- as.big.matrix(matrix(1:30, 10, 3)) y <- deepcopy(x, -1) # Don't include the first column. x y head(x) head(y)