'disk.matrix' contains a file path to a matrix stored on disk,
along with meta data for how to read that file. This allows NetRep
to load datasets into RAM only when required, i.e. one at a time. This
significantly reduces the memory usage of R when analysing large datasets.
'disk.matrix' objects may be supplied instead of
objects in the input list arguments
'correlation', which are common to most of NetRep's functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
attach.disk.matrix(file, serialized = TRUE, ...) serialize.table(file, ...) is.disk.matrix(x) as.disk.matrix(x, file, serialize = TRUE) ## S4 method for signature 'disk.matrix' as.disk.matrix(x, file, serialize = TRUE) ## S4 method for signature 'matrix' as.disk.matrix(x, file, serialize = TRUE) ## S4 method for signature 'ANY' as.disk.matrix(x, file, serialize = TRUE) ## S4 method for signature 'disk.matrix' as.matrix(x) ## S4 method for signature 'disk.matrix' show(object)
determines how the matrix will be loaded from disk into R
arguments to be used by
determines how the matrix is saved to disk by
Matrices may either be stored as regular table files that can be read by
read.table, or as serialized R objects that can be read by
readRDS. Serialized objects are much faster to load, but
cannot be read by other programs.
attach.disk.matrix function creates a
from a file path. The
as.matrix function will load the data from disk
into the R session as a regular
as.disk.matrix function converts a matrix into a
disk.matrix by saving its contents to the specified
serialize argument determines whether the data is stored as a
serialized R object or as a tab-separated file (i.e.
recommend storing the matrix as a serialized R object unless disk space is
a concern. More control over the storage format can be obtained by using
serialize.matrix function converts a file in table format to a
serialized R object with the same file name, but with the ".rds" extension.
disk.matrix object (
as.matrix), the file path to a serialized matrix
serialize.table), or a
whether an object is a
the name of the file where the matrix is saved.
a list of arguments to be supplied to the
attach.disk.matrix does not check whether the specified file can be
read into R.
as.matrix will fail and throw an error if this is the
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.