Learn R Programming

era (version 0.4.1)

yr: Create a vector of years with era

Description

A yr object represents years with an associated calendar era or time scale.

Usage

yr(x = numeric(), era = character())

Value

A yr (era_yr) object.

Arguments

x

A numeric vector of years.

era

The calendar era used by x. Either:

  • A string matching one of the standard era labels defined in eras()

  • An era object constructed with era()

See Also

Other years with era functions: yr_era(), yr_transform()

Examples

Run this code
# The R Age
yr(1993:2020, "CE")

# A bad movie
yr(10000, "BC")

Run the code above in your browser using DataLab