Learn R Programming

R.oo (version 1.26.0)

objectSize.Object: Gets the size of the Object in bytes

Description

Gets the size of the Object in bytes by summing the sizes of all its members. For this reason, the size of memory the Object actually allocates might vary slightly.

Usage

# S3 method for Object
objectSize(this, ...)

Value

Returns an integer specifying the size of the object in number of bytes.

Arguments

...

Not used.

Author

Henrik Bengtsson

See Also

To clear fields that are declared cached, see *clearCache(). object.size. For more information see Object.

Examples

Run this code
  obj <- Object()
  obj$x <- 1:100
  obj$y <- 100:1
  objectSize(obj)   # 856

Run the code above in your browser using DataLab