tables | R Documentation |
Convenience function for concisely summarizing some metadata of all data.table
s in memory (or an optionally specified environment).
tables(mb=type_size, order.col="NAME", width=80,
env=parent.frame(), silent=FALSE, index=FALSE)
mb |
a function which accepts a |
order.col |
Column name ( |
width |
|
env |
An |
silent |
|
index |
|
Usually tables()
is executed at the prompt, where parent.frame()
returns .GlobalEnv
. tables()
may also be useful inside functions where parent.frame()
is the local scope of the function; in such a scenario, simply set it to .GlobalEnv
to get the same behaviour as at prompt.
'mb = utils::object.size' provides a higher and more accurate estimate of size, but may take longer. Its default 'units="b"' is appropriate.
Setting silent=TRUE
prints nothing; the metadata is returned as a data.table
invisibly whether silent
is TRUE
or FALSE
.
A data.table
containing the information printed.
data.table
, setkey
, ls
, objects
, object.size
DT = data.table(A=1:10, B=letters[1:10])
DT2 = data.table(A=1:10000, ColB=10000:1)
setkey(DT,B)
tables()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.