lss | R Documentation |
List, and optionally plot, all the objects in the specified environment along with their class attribute and size in bytes.
lss(graph = FALSE, env = .GlobalEnv, ...)
graph |
logical, should a dotchart of sizes by produced |
env |
environment to scan for objects, defaults to Global Environment |
... |
other arguments passed to |
The function scans the environment supplied by env
with the ls
function for objects. Then the classes of these objects are retrieved with
object.size
.
If graph
is TRUE
then additionally a dotchart with showing
object sizes is produced.
A data frame with two columns class
and size
containing the
class and size (in bytes) of the objects found in the environment
env
.
ls
for listing the objects, object.size
for
calculating the memory size of an object, dotchart
for making
dotcharts
# make some environment
e <- new.env()
# create some objects in it
assign("x", rnorm(10), envir=e)
assign("d", data.frame(a=1:10, b=10:1), envir=e)
assign("l", letters, envir=e)
# table of contents
lss(env=e)
# with a chart
lss(TRUE, env=e)
# clean-up
rm(e)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.