object.size: The memory used to store a process data R object.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This method builds on the function of the same name from the utils package, and provides an estimate of the total memory consumption attributable to a process data object.

Usage

1
2
3
4
5
6
## S4 method for signature 'ProcessData'
object.size(x)
## S4 method for signature 'ContinuousProcess'
object.size(x)
## S4 method for signature 'MarkedPointProcess'
object.size(x)

Arguments

x

a process object.

Details

Several process data objects may share memory as the data are stored by reference, for instance if they are all subsets of the same process data object. The object size reported by this function is the object's memory consumption from the single object's point of view.

To get the classical memory usage estimate for process data objects call utils:::object.size instead, see the examples. This ignores all the data in the environments.

Value

An object of class "object_size" with a length-one double value, an estimate of the total memory allocation attributable to the object in bytes.

Author(s)

Niels Richard Hansen, Niels.R.Hansen@math.ku.dk.

See Also

object.size

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(example)
object.size(pointExam)
utils:::object.size(pointExam) 

## Subsetting _increases_ the memory estimate for the single object,
## however, the subsetted object does not contain a copy of the data,
## only a reference and the pointers to the subset.  

object.size(pointExam[1:2500,1:4])

## A "copy-through" construction where the data is copied too is
## obtained by calling the constructor. This reduces the memory
## consumption for the single object, but creates a copy of the data. 

object.size(markedPointProcess(pointExam[1:2500,1:4]))

ppstat documentation built on May 2, 2019, 5:26 p.m.