Learn R Programming

aion (version 1.4.0)

arithmetic: Arithmetic Operators

Description

Operators performing arithmetic operations.

Usage

# S4 method for RataDie,RataDie
Arith(e1, e2)

# S4 method for numeric,RataDie Arith(e1, e2)

# S4 method for RataDie,numeric Arith(e1, e2)

Value

A logical vector.

Arguments

e1, e2

A RataDie object or a numeric vector.

Author

N. Frerebeau

Details

Rata die will be converted to a plain numeric vector if a computation no longer makes sense in temporal terms.

See Also

Other fixed date tools: as_date(), as_decimal(), as_fixed(), as_year(), fixed(), fixed_gregorian, fixed_julian, format(), pretty()

Examples

Run this code
## Vectors of years
x <- fixed(c(-350, 31, 1072, 576, 1130), calendar = CE())
y <- fixed(c(1494, 1645, -869, 1440, 1851), calendar = CE())

## Move forward in time
x + y

## Move backward in time
x - y

## Not rata die anymore
x * y

Run the code above in your browser using DataLab