| Constructor {memuse} | R Documentation |
Constructor for objects of class memuse.
mu(size, unit = .UNIT, unit.prefix = .PREFIX, unit.names = .NAMES) ## S4 method for signature 'ANY' mu(size = 0, 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 'ANY' memuse(size = 0, 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)
size |
|
unit |
|
unit.prefix |
|
unit.names |
|
For numeric objects, if the length is 1, then its value is used as the number of bytes. Otherwise, the object's memory usage in R is taken for the size parameter.
Returns a memuse class object.
memuse-class Accessors Converters
## Not run: ### The value passed as 'size' is the number of bytes x <- memuse(100, unit="kb") x y <- memuse(100, unit="kb", unit.prefix="SI") y ### Use the memory usage of object 'size' memuse(rnorm(1e4)) ## End(Not run)