Constructor {memuse} | R Documentation |
memuse Constructor
Description
Constructor for objects of class memuse
.
Usage
mu(size, unit = "best", prefix = "IEC", names = "short")
## S4 method for signature 'ANY'
mu(size, unit = "best", prefix = "IEC", names = "short")
## S4 method for signature ''NULL''
mu(size, unit = "best", prefix = "IEC", names = "short")
## S4 method for signature 'numeric'
mu(size, unit = "best", prefix = "IEC", names = "short")
## S4 method for signature 'object_size'
mu(size, unit = "best", prefix = "IEC", names = "short")
## S4 method for signature 'missing'
mu(size, unit = "best", prefix = "IEC", names = "short")
memuse(size, unit = "best", prefix = "IEC", names = "short")
## S4 method for signature 'ANY'
memuse(size, unit = "best", prefix = "IEC", names = "short")
## S4 method for signature ''NULL''
memuse(size, unit = "best", prefix = "IEC", names = "short")
## S4 method for signature 'missing'
memuse(size, unit = "best", prefix = "IEC", names = "short")
## S4 method for signature 'numeric'
memuse(size = size, unit = "best", prefix = "IEC", names = "short")
## S4 method for signature 'object_size'
memuse(size, unit = "best", prefix = "IEC", names = "short")
Arguments
size |
|
unit |
|
prefix |
|
names |
|
Details
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.
Value
Returns a memuse
class object.
See Also
memuse-class Accessors Converters
Examples
## Not run:
### The value passed as 'size' is the number of bytes
x <- memuse(100, unit="kb")
x
y <- memuse(100, unit="kb", prefix="SI")
y
### Use the memory usage of object 'size'
memuse(rnorm(1e4))
## End(Not run)
[Package memuse version 4.2-3 Index]