logical; TRUE adds the rough size of each data.table in megabytes to the output under column MB.
Column name (character) by which to sort the output.
integer; number of characters beyond which the output for each of the columns COLS, KEY, and INDICES are truncated.
An environment, typically the .GlobalEnv by default, see Details.
logical; should the output be printed?
logical; if TRUE, the column INDICES is added to indicate the indices assorted with each object, see indices.
A data.table containing the information printed.
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.
Note that on older versions of R, object.size may be slow, so setting mb=FALSE may speed up execution of tables significantly.
Setting silent=TRUE prints nothing; the metadata are returned as a data.table, invisibly, whether silent is TRUE or FALSE.