joeroe / era

R package for year-based time scales

Home Page:https://era.joeroe.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

era arguments should always accept a character label

joeroe opened this issue · comments

Currently:

library("era")
yr(1, "BP")
#> # BP years <yr[1]>:
#> [1] 1
#> # Era: Before Present (BP): calendar years, counted backwards from 1950

But:

yr_set_era(1, era("BP"))
#> # BP years <yr[1]>:
#> [1] 1
#> # Era: Before Present (BP): calendar years, counted backwards from 1950

Created on 2020-11-12 by the reprex package (v0.3.0)

This as annoying. Every function that has an era argument should also accept a character label to look up in eras().