Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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 class 'Object'
objectSize(this, ...)

Arguments

...

Not used.

Value

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

Author(s)

Henrik Bengtsson

See Also

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

Examples

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

R.oo

R Object-Oriented Programming with or without References

v1.24.0
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.