Skip to contents

Object Size and Sizes of Sub Structures in Mb

Usage

objectSize(x, max_depth = 2, units = "auto", depth = 0)

Arguments

x

object

max_depth

number of sub levels of list structures to be shown

units

passed to object.size

depth

depth of recursive call (for internal use only)

Value

if x is a list, a list of the same structure is returned with each list elemenet replaced by its size, otherwise the object size of

x. Each list or sub list with more than one element is assigned an attribute "total" to containing the total size of the list.