xObjSize: Function to estimate memory allocated for an R variable or a...

Description Usage Arguments Value Note See Also Examples

View source: R/xObjSize.r

Description

xObjSize is supposed to estimate memory allocated for an R variable or a file.

Usage

1
2
3
4
5
6
xObjSize(
obj,
type = c("auto", "variable", "file"),
units = "auto",
verbose = TRUE
)

Arguments

obj

character specifying an R variable or a local file

type

the object type specifying an R object or a local file. It can be 'variable', 'file' or 'auto' (by default; automatically determined)

units

the units to be used in formatting the size. It can be 'auto', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb'

verbose

logical to indicate whether the messages will be displayed in the screen. By default, it sets to TRUE for display

Value

If action is logical, a list containing arguments and their default values. If action is NULL, a string specifying the assignment to be evalated.

Note

This function is potentially useful when debugging as it frees developers from specifying default values for all arguments except those arguments of interest

See Also

xObjSize

Examples

1
2
3
xObjSize(ls()[1])
#res <- lapply(ls(), xObjSize)
#res <- lapply(list.files(), xObjSize)

XGR documentation built on Jan. 8, 2020, 5:06 p.m.

Related to xObjSize in XGR...