interarrival: Calculate interarrival rates

Description Arguments Value Usage Details Author(s) Examples

Description

Given a sequence of dates, compute the interarrival rates.

Arguments

dates

A sequence of dates

Value

A sequence of interarrival rates are returned. The length will always be 1 less than the length of the input dates. Any names associated with the date sequence are copied over to the return sequence with the first name dropped. This makes sense since the first interarrival rate is only available once the event associated with the second element arrives.

Usage

interarrival interarrival(dates)

interarrival

Details

This function is a convenience wrapper around difftime to calculate interarrival rates for irregular time series.

Author(s)

Brian Lee Yung Rowe

Examples

1
2
d <- Sys.Date() + cumsum(round(c(runif(20,5,10), runif(20,25,30))))
interarrival(d)

zatonovo/kingsmen documentation built on May 4, 2019, 9:11 p.m.