yr: Create a vector of years with era

View source: R/s3-yr.R

yrR Documentation

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())

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()

Value

A yr (era_yr) object.

See Also

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

Examples

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

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

era documentation built on Nov. 17, 2022, 5:06 p.m.