Skip to contents

Rate of Change

Usage

roc(object, ...)

# S4 method for EventsMCMC
roc(object, from = min(object), to = max(object), resolution = NULL)

# S4 method for CumulativeEvents
roc(object)

# S4 method for ActivityEvents
roc(object)

# S4 method for RateOfChange
autoplot(object, ..., colour = "black")

# S4 method for RateOfChange,missing
plot(x, colour = "black", ...)

Arguments

object

An EventsMCMC, a CumulativeEvents or an ActivityEvents object.

...

Currently not used.

from

A length-one numeric vector giving the earliest date to estimate for (in years).

to

A length-one numeric vector giving the latest date to estimate for (in years).

resolution

A length-one numeric vector specifying the temporal resolution (in years) at which densities are to be estimated. If NULL (the default), equally spaced points will be used (according to options("chronos.grid")).

colour

A character string specifying the colour of the segments.

x

A RateOfChange object.

Value

  • roc() returns an RateOfChange object.

  • autoplot() returns a ggplot object.

  • plot() is called it for its side-effects: it results in a graphic being displayed (invisibly returns x).

See also

Other event tools: activity(), occurrence(), rec, tempo()

Author

N. Frerebeau

Examples

## Coerce to MCMC
eve <- as_events(events, calendar = "CE", iteration = 1)
eve <- eve[1:10000, ]

## Tempo plot
tmp <- tempo(eve)
plot(tmp, credible = TRUE, gauss = FALSE)

plot(tmp, credible = FALSE, gauss = TRUE)


## Activity plot
act <- activity(tmp)
plot(act)