R: howbig

howbig {memuse} | R Documentation

## howbig

### Description

Determines the memory usage for a dense, in-core, numeric matrix of specified rows/columns.

### Usage

    howbig(nrow, ncol, representation = "dense", unit = .UNIT,
      unit.prefix = .PREFIX, unit.names = .NAMES, ..., sparsity = 0.05,
      type = "double", intsize = 4)

    howbig.par(nrow, ncol, cores = 1, par = "balanced", unit = .UNIT,
      unit.prefix = .PREFIX, unit.names = .NAMES, ..., type = "double",
      intsize = 4, ICTXT = 0, bldim = c(4, 4))

### Arguments

`nrow, ncol` | Number of (global) rows/columns of the matrix.
`representation` | The kind of storage the object would be in, i.e. "dense" or "sparse".
`unit` | string; the unit of storage, such as "MiB" or "MB", depending on prefix. Case is ignored.
`unit.prefix` | string; the unit prefix, namely IEC or SI. Case is ignored.
`unit.names` | 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.
`...` | Additional arguments.
`sparsity` | The proportion of sparsity of the matrix if `representation="sparse"`
`type` | "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.
`intsize` | The size (in bytes) of an integer. Default is 4, but this is platform dependent.
`cores` | The number of cores/processors
`par` | Type of data distribution. Choices are "dmat" or "balanced". The former is for pbdDMAT objects, the latter is the simple, locally load-balanced block partitioning.
`ICTXT` | BLACS context number; only used with `howbig.par()` with `par="dmat"`.
`bldim` | Blocking factor for block-cyclically decomposed (dmat) data.

### Details

These functions provide the memory usage of an unallocated, dense, in-core, numeric matrix. As the names suggest, `howbig()` simply returns the size (as a `memuse` object), while `howbig.par()` is the parallel, distributed analogue. The latter returns the memory usage of a distributed, object

### Value

`howbig()` returns a `memuse` class object.

`howbig.par()` returns a list of 2 elements, each of class `memuse`. One is the total memory usage, the other is the local memory usage.

### See Also

`howmany`

### Examples

    ## Not run:
    # size of a 1000x1000 matrix
    howbig(1000, 1000)

    ## End(Not run)

[Package memuse version 3.0-1 Index]