This has methods for various types of things that may not correctly report
their object.size using object\.size. Also, for lists and environments,
it will return the object.size separately for each element.
Usage
objSize(x, quick)
# S3 method for list
objSize(x, quick = getOption("reproducible.quick", FALSE))
# S3 method for environment
objSize(x, quick = getOption("reproducible.quick",
FALSE))
# S3 method for default
objSize(x, quick = getOption("reproducible.quick", FALSE))
# S3 method for Path
objSize(x, quick = getOption("reproducible.quick", FALSE))
Arguments
x
An object
quick
Logical. Only some methods use this. e.g.,
Path class objects. In which case, file.size will be
used instead of object.size.
# NOT RUN {a <- new.env()
a$b <- 1:10a$d <- 1:10objSize(a) # all the elements in the environmentobject.size(a) # different - only measuring the environment as an object# }