Learn R Programming

aion (version 1.4.0)

intervals: Create Time Intervals

Description

An Interval is elapsed time in seconds between two specific years.

Usage

intervals(start, end, calendar, ...)

# S4 method for RataDie,RataDie,missing intervals(start, end, names = NULL)

# S4 method for numeric,numeric,TimeScale intervals(start, end, calendar, scale = 1, names = NULL)

Value

A TimeIntervals object.

Arguments

start

A numeric vector of (decimal) years or a RataDie object (see fixed()) giving the beginning of the time intervals.

end

A numeric vector of (decimal) years or a RataDie object (see fixed()) giving the end of the time intervals.

calendar

A TimeScale object specifying the calendar of time (see calendar()). If missing, time must be a RataDie object.

...

Currently not used.

names

A character string specifying the names of the time series.

scale

A length-one numeric vector specifying the number of years represented by one unit. It should be a power of 10 (i.e. 1000 means ka).

Author

N. Frerebeau

Examples

Run this code
## Create time intervals
int <- intervals(
  start = c(625, 700, 1200, 1225, 1250, 500, 1000, 1200,
            1325, 1375, 1200, 1300, 1375, 1275, 1325),
  end = c(750, 825, 1250, 1275, 1325, 700, 1300, 1325,
          1400, 1500, 1300, 1375, 1500, 1325, 1425),
  calendar = CE()
)

## Plot intervals
plot(int) # Default calendar

## Overlap
overlap(int, calendar = CE())

Run the code above in your browser using DataLab