Converters | R Documentation |
Converter methods between memuse and base R objects.
as.memuse(x, ...) ## S4 method for signature 'numeric' as.memuse(x, unit = "best", prefix = "IEC", names = "short") ## S4 method for signature 'object_size' as.memuse(x, unit = "best", prefix = "IEC", names = "short") ## S4 method for signature 'character' as.memuse(x, unit = "best", prefix = "IEC", names = "short") ## S4 method for signature 'memuse' as.character(x, ...) ## S4 method for signature 'memuse' as.numeric(x, ...)
x |
Numeric value, object_size data, or appropriate string (see details section for more information). |
... |
Additional arguments. |
unit |
|
prefix |
|
names |
|
These methods convert numeric, object_size
, and string (character)
objects to/from memuse
objects.
as.numeric(x)
for a memuse object x
is just sugar for
mu.size(x, as.is=FALSE)
Strings must be of the same form as the printed output of a a memuse object. For example, "100 KiB" is valid, but "100 (KiB)" is not. As always, case of the unit is ignored, and so "100 kib" would be valid as well.
Returns a character, numeric, or memuse
object, depending on the call.
memuse-class Accessors
## Not run: as.memuse(10) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.