Package: era 0.5.0

Joe Roe

era: Year-Based Time Scales

Provides a consistent representation of year-based time scales as a numeric vector with an associated 'era'. There are built-in era definitions for many year numbering systems used in contemporary and historic calendars (e.g. Common Era, Islamic 'Hijri' years); year-based time scales used in archaeology, astronomy, geology, and other palaeosciences (e.g. Before Present, SI-prefixed 'annus'); and support for arbitrary user-defined eras. Years can converted from any one era to another using a generalised transformation function. Methods are also provided for robust casting and coercion between years and other numeric types, type-stable arithmetic with years, and pretty-printing in tables.

Authors:Joe Roe [aut, cre]

era_0.5.0.tar.gz
era_0.5.0.tar.gz(r-4.5-noble)era_0.5.0.tar.gz(r-4.4-noble)
era_0.5.0.tgz(r-4.4-emscripten)era_0.5.0.tgz(r-4.3-emscripten)
era.pdf |era.html
era/json (API)
NEWS

# Install 'era' in R:
install.packages('era', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/joeroe/era/issues

2.70 score 4 scripts 444 downloads 28 exports 8 dependencies

Last updated 5 days agofrom:c461f61683. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 25 2024
R-4.5-linuxOKNov 25 2024

Exports:eraera_directionera_epochera_labelera_nameera_scaleera_unitera_yearera_year_daysera_year_labelerasis_erais_era_yearis_valid_erais_valid_yris_yrthis_yearvalidate_eravalidate_yryryr_earliestyr_erayr_era<-yr_latestyr_rangeyr_set_erayr_sortyr_transform

Dependencies:clifansigluelifecyclepillarrlangutf8vctrs

Years with an era

Rendered fromera.Rmdusingknitr::rmarkdownon Nov 25 2024.

Last update: 2022-03-09
Started: 2021-01-29

Readme and manuals

Help Manual

Help pageTopics
Create an era objectera
Get parameters of an eraera_direction era_epoch era_label era_name era_parameters era_scale era_unit
Year unitsera_year
Get the parameters of an 'era_year' object.era_year_days era_year_label era_year_parameters
Standard era definitionseras
Validation functions for 'era' objectsis_era is_valid_era validate_era
Validation functions for 'era_year' objectsis_era_year
Validation functions for 'yr' objectsis_valid_yr is_yr validate_yr
Current yearthis_year
Create a vector of years with erayr
Get or set the era of a vector of yearsyr_era yr_era<- yr_set_era
Chronological minima and maximayr_earliest yr_extremes yr_latest yr_range
Chronological ordering of year vectorsyr_sort
Convert years from one era to anotheryr_transform