Determines the memory usage for a dense, in-core, numeric matrix of specified rows/columns.
howbig(
nrow = 1,
ncol = 1,
representation = "dense",
unit = "best",
prefix = "IEC",
names = "short",
sparsity = 0.05,
type = "double",
intsize = 4
)
returns a memuse
class object.
Number of (global) rows/columns of the matrix.
The kind of storage the object would be in, i.e. "dense" or "sparse".
string; the unit of storage, such as "MiB" or "MB", depending on prefix. Case is ignored.
string; the unit prefix, namely IEC or SI. Case is ignored.
string; control for whether the unit names should be printed out or their abbreviation should be used. Options are "long" and "short", respectively. Case is ignored.
The proportion of sparsity of the matrix if
representation="sparse"
"float", "double", or "int"; the storage type of the data matrix. If you don't know the type, it is probably stored as a double, so the default value will suffice.
The size (in bytes) of an integer. Default is 4, but this is platform dependent.
These functions provide the memory usage of an unallocated, dense, in-core,
numeric matrix. As the name suggests, howbig()
simply returns the
size (as a memuse
object).
howmany
if (FALSE) {
# size of a 1000x1000 matrix
howbig(1000, 1000)
}
Run the code above in your browser using DataLab