Learn R Programming

XGR (version 1.1.7)

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

Description

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

Usage

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.

See Also

xObjSize

Examples

Run this code
# NOT RUN {
xObjSize(ls()[1])
#res <- lapply(ls(), xObjSize)
#res <- lapply(list.files(), xObjSize)
# }

Run the code above in your browser using DataLab