insert: Insert

Description Usage Arguments Details Value Examples

Description

The generic function insert stores a value into one of the the buckets of the exponential histogram.

Usage

1
2
3
4
5
6
7
insert(x, val, ts = NULL)

## S3 method for class 'exphist'
insert(x, val, ts = NULL)

## S3 method for class 'exphist'
insert(x, val, ts = NULL)

Arguments

x

an exponential histogram

val

a value to be inserted into the histogram

ts

a timestamp

Details

For exponential histograms, insert.exphist will be used. For any other objects, insert.default will be used to spawn an error message. Use methods(insert).

Value

the histogram holding the newly inserted value

Examples

1
2
3
4
## Create the exp. hist.
eh <- exphist()
## Compute the value
insert(eh, 1)

pcosta74/exphist documentation built on May 15, 2019, 9:58 p.m.