| Replacers {memuse} | R Documentation |
Replacement methods for slots of objects of class memuse.
size(x) <- value unit(x) <- value unit.prefix(x) <- value unit.names(x) <- value ## S4 replacement method for signature 'memuse' size(x) <- value ## S4 replacement method for signature 'memuse' unit(x) <- value ## S4 replacement method for signature 'memuse' unit.prefix(x) <- value ## S4 replacement method for signature 'memuse' unit.names(x) <- value
x |
memuse object |
value |
replacement value |
These methods are syntactic sugar for assignment using ordinary S4
accessors. So for example, size(x) <- 10 is semantically no
different from calling x@size <- 10
These methods are strict replacement methods; if you need to swap the units
of a memuse class object, you should probably be using the
Swaps methods. See example below for further details.
Returns a numeric element in the case of size(), otherwise a
string is returned.
## Not run: x <- mu(2000, unit="bytes") x size(x) <- 1000 x ## End(Not run)