Last data update: 2014.03.03

R: memuse Constructor
ConstructorR Documentation

memuse Constructor

Description

Constructor for objects of class memuse.

Usage

mu(size, unit = .UNIT, unit.prefix = .PREFIX, unit.names = .NAMES)

## S4 method for signature ''NULL''
mu(size = 0, unit = .UNIT, unit.prefix = .PREFIX,
  unit.names = .NAMES)

## S4 method for signature 'numeric'
mu(size = 0, unit = .UNIT, unit.prefix = .PREFIX,
  unit.names = .NAMES)

## S4 method for signature 'object_size'
mu(size, unit = .UNIT, unit.prefix = .PREFIX,
  unit.names = .NAMES)

## S4 method for signature 'missing'
mu(size = 0, unit = .UNIT, unit.prefix = .PREFIX,
  unit.names = .NAMES)

memuse(size, unit = .UNIT, unit.prefix = .PREFIX, unit.names = .NAMES)

## S4 method for signature ''NULL''
memuse(size = 0, unit = .UNIT, unit.prefix = .PREFIX,
  unit.names = .NAMES)

## S4 method for signature 'missing'
memuse(size = 0, unit = .UNIT, unit.prefix = .PREFIX,
  unit.names = .NAMES)

## S4 method for signature 'numeric'
memuse(size = 0, unit = .UNIT, unit.prefix = .PREFIX,
  unit.names = .NAMES)

## S4 method for signature 'object_size'
memuse(size, unit = .UNIT, unit.prefix = .PREFIX,
  unit.names = .NAMES)

Arguments

size

numeric; indicates the unit-multiple number of bytes used by the object.

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.

Details

Simple constructor for memuse objects.

Value

Returns a memuse class object.

See Also

memuse-class Accessors Converters

Examples

## Not run: 
x <- mu(100, unit="kb")
x

y <- mu(100, unit="kb", unit.prefix="SI")
y

## End(Not run)

Results