showObjectsSize | R Documentation |
showObjectsSize
shows how much memory do objects in specific
environment(s) occupy. It builds upon object.size
and
gathers information about the size and mode
of objects in specific
environment(s). It supports environment name filtering using regular
expressions, object mode
filtering, as well as filtering by size.
showObjectsSize(mode = NULL,
n = 20, env = parent.frame(),
recursive = FALSE,
envNameRegexpr = NULL,
all.names = TRUE,
sizeUnits = 1024 *
1024, verbose = FALSE)
mode |
|
n |
number of objects to show (the first |
env |
environment to operate in. |
recursive |
shall we iteratively look in parent environments? |
envNameRegexpr |
regular expression character filter applied
to the names of environments. If not |
all.names |
if |
sizeUnits |
the units of size (defaults to 1MB) |
verbose |
if |
Partially based on http://jeromyanglim.blogspot.cz/2009/11/memory-management-in-r-few-tips-and.html.
A data frame of columns name
, size
, mode
,
and env
.
In addition, the total size of all objects found is put into
the totalSize
attribute of the data frame.
Tomas Sieger
object.size
, ls
, mode
showObjectsSize(n=20)
if (require('MASS')) {
showObjectsSize(mode = 'numeric', envNameRegexpr = glob2rx('package:MASS'), rec = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.