These methods are mostly just syntactic sugar for ordinary S4 slot
accessing. So for example, size(x)
is no different semantically from
calling x@size
.
There are two differences, however. The size()
method has a
parameter as.is
which controls whether the return should be the raw
value or the raw value converted to bytes first. For the latter, you should
really use as.numeric
instead, which is equivalent to calling
size(x, as.is=FALSE)
.