Package: aion 1.4.0

Nicolas Frerebeau

aion: Archaeological Time Series

A toolkit for archaeological time series and time intervals. This package provides a system of classes and methods to represent and work with archaeological time series and time intervals. Dates are represented as "rata die" and can be converted to (virtually) any calendar defined by Reingold and Dershowitz (2018) <doi:10.1017/9781107415058>. This packages offers a simple API that can be used by other specialized packages.

Authors:Nicolas Frerebeau [aut, cre], Joe Roe [aut], Brice Lebrun [art], Université Bordeaux Montaigne [fnd], CNRS [fnd]

aion_1.4.0.tar.gz
aion_1.4.0.tar.gz(r-4.5-noble)aion_1.4.0.tar.gz(r-4.4-noble)
aion_1.4.0.tgz(r-4.4-emscripten)aion_1.4.0.tgz(r-4.3-emscripten)
aion.pdf |aion.html
aion/json (API)
NEWS

# Install 'aion' in R:
install.packages('aion', repos = 'https://cloud.r-project.org')

Bug tracker:https://codeberg.org/tesselle/aion

Pkgdown site:https://packages.tesselle.org

Datasets:
  • dates - Sample Data from Reingold and Dershowitz

On CRAN:

Conda:

time-seriesarchaeologyarchaeological-sciencechronology

4.65 score 3 packages 708 downloads 57 exports 1 dependencies

Last updated 1 months agofrom:ef0aecce83. Checks:2 OK, 1 NOTE. Indexed: no.

TargetResultLatest binary
Doc / VignettesOKMar 29 2025
R-4.5-linuxOKMar 29 2025
R-4.4-linuxNOTEMar 29 2025

Exports:ADArithas_dateas_decimalas_fixedas_graphas_yearas.data.frameb2kBCBCEBPcalendarcalendar_directioncalendar_epochcalendar_fixedcalendar_labelcalendar_namecalendar_unitcalendar_yearCEconvertendfixedfixed_from_ADfixed_from_b2kfixed_from_BCfixed_from_BCEfixed_from_BPfixed_from_CEfixed_from_julianfixed_to_ADfixed_to_b2kfixed_to_BCfixed_to_BCEfixed_to_BPfixed_to_CEfixed_to_julianformatfrequencyget_calendarimageintervalsis_calendaris_gregorianis_julianJoverlapplotprettyseriesset_calendarspanstarttimewindowyear_axis

Dependencies:arkhe

Extending aion

Rendered fromextending.Rmdusingknitr::knitron Mar 29 2025.

Last update: 2025-02-27
Started: 2023-06-13

Introduction to aion

Rendered fromaion.Rmdusingknitr::knitron Mar 29 2025.

Last update: 2025-02-27
Started: 2023-06-13

Citation

To cite aion in publications use:

Frerebeau N (2024). “aion: An R Package to Represent Archaeological Time Series.” Journal of Open Source Software, 9(96), 6210. doi:10.21105/joss.06210.

Frerebeau N, Roe J (2025). aion: Archaeological Time Series. Université Bordeaux Montaigne, Pessac, France. doi:10.5281/zenodo.8032278, R package version 1.4.0, https://packages.tesselle.org/aion/.

This package is a part of the tesselle project <https://www.tesselle.org>.

Corresponding BibTeX entries:

  @Article{frerebeau2024,
    author = {Nicolas Frerebeau},
    title = {{aion: An R Package to Represent Archaeological Time
      Series}},
    year = {2024},
    journal = {Journal of Open Source Software},
    volume = {9},
    number = {96},
    pages = {6210},
    doi = {10.21105/joss.06210},
  }
  @Manual{R-aion,
    author = {Nicolas Frerebeau and Joe Roe},
    title = {{aion: Archaeological Time Series}},
    year = {2025},
    organization = {Université Bordeaux Montaigne},
    address = {Pessac, France},
    note = {R package version 1.4.0},
    url = {https://packages.tesselle.org/aion/},
    doi = {10.5281/zenodo.8032278},
  }

Readme and manuals

aion

Overview

Base R ships with a lot of functionality useful for time series, in particular in the stats package. However, these features are not adapted to most archaeological time series. These are indeed defined for a given calendar era, they can involve dates very far in the past and the sampling of the observation time is (in most cases) not constant.

aion provides a system of classes and methods to represent and work with such time-series (and time intervals). Dates are represented as rata die (Reingold and Dershowitz 2018), i.e. the number of days since 01-01-01 (Gregorian), with negative values for earlier dates. This allows to represent dates independently of any calendar: it makes calculations and comparisons easier.

Once a time series is created with aion, any calendar can be used for printing or plotting data (defaults to Gregorian Common Era; see vignette("aion")).

aion does not provide tools for temporal modeling. Instead, it offers a simple API that can be used by other specialized packages (see kairos or ananke).


To cite aion in publications use:

Frerebeau N (2024). “aion: An R Package to Represent Archaeological Time Series.” Journal of Open Source Software, 9(96), 6210. doi:10.21105/joss.06210 https://doi.org/10.21105/joss.06210.

Frerebeau N, Roe J (2025). aion: Archaeological Time Series. Université Bordeaux Montaigne, Pessac, France. doi:10.5281/zenodo.8032278 https://doi.org/10.5281/zenodo.8032278, R package version 1.4.0, https://packages.tesselle.org/aion/.

This package is a part of the tesselle project https://www.tesselle.org.

Installation

You can install the released version of aion from CRAN with:

install.packages("aion")

And the development version from Codeberg with:

# install.packages("remotes")
remotes::install_git("https://codeberg.org/tesselle/aion")

Usage

## Load package
library(aion)

Time-series of ceramic counts:

## Get ceramic counts (data from Husi 2022)
data("loire", package = "folio")

## Keep only variables whose total is at least 600
keep <- c("01f", "01k", "01L", "08e", "08t", "09b", "15i", "15q")

## Get time midpoints
mid <- rowMeans(loire[, c("lower", "upper")])

## Create time-series
X <- series(
  object = loire[, keep],
  time = mid,
  calendar = AD()
)

## Plot (default calendar)
plot(
  x = X, 
  type = "h" # histogram like vertical lines
)

Plot time ranges:

## Create time intervals
Y <- intervals(
  start = loire$lower,
  end = loire$upper,
  names = rownames(loire),
  calendar = AD()
)

## Plot (default calendar)
plot(x = Y)

Translation

This package provides translations of user-facing communications, like messages, warnings and errors, and graphical elements (axis labels). The preferred language is by default taken from the locale. This can be overridden by setting of the environment variable LANGUAGE (you only need to do this once per session):

Sys.setenv(LANGUAGE = "<language code>")

Languages currently available are English (en) and French (fr).

Related Works

  • era provides a consistent representation of year-based time scales as a numeric vector with an associated era.

Contributing

Please note that the aion project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

References

Reingold, Edward M., and Nachum Dershowitz. 2018. Calendrical Calculations: The Ultimate Edition. 4th ed. Cambridge University Press. https://doi.org/10.1017/9781107415058.

Help Manual

Help pageTopics
Arithmetic OperatorsArith,numeric,RataDie-method Arith,RataDie,numeric-method Arith,RataDie,RataDie-method arithmetic
Date Conversion from _Rata Die_as_date as_date,numeric,GregorianCalendar-method as_date,numeric,JulianCalendar-method as_date-method
Converts a Date to a Decimal of its Yearas_decimal as_decimal,numeric,numeric,numeric,GregorianCalendar-method as_decimal,numeric,numeric,numeric,JulianCalendar-method as_decimal-method
Coerce to _Rata Die_as_fixed as_fixed,numeric-method as_fixed-method
Interval Graphas_graph as_graph,TimeIntervals-method as_graph-method
Year Conversion from _Rata Die_as_year as_year,numeric,GregorianCalendar-method as_year,numeric,JulianCalendar-method as_year-method
Coerce to a Data Frameas.data.frame as.data.frame,TimeIntervals-method as.data.frame,TimeSeries-method
Calendarcalendar calendar,character-method calendar-method
Calendar Parameterscalendar_direction calendar_direction,NULL-method calendar_direction,TimeScale-method calendar_direction-method calendar_epoch calendar_epoch,TimeScale-method calendar_epoch-method calendar_fixed calendar_fixed,TimeScale-method calendar_fixed-method calendar_get calendar_label calendar_label,TimeScale-method calendar_label-method calendar_name calendar_name,TimeScale-method calendar_name-method calendar_unit calendar_unit,TimeScale-method calendar_unit-method calendar_year calendar_year,TimeScale-method calendar_year-method
Calendar Converterconvert convert,character,character-method convert,TimeScale,TimeScale-method convert-method
Sample Data from Reingold and Dershowitz (2018)dates
_Rata Die_ (Fixed Date)fixed fixed,numeric,missing,missing,GregorianCalendar-method fixed,numeric,missing,missing,JulianCalendar-method fixed,numeric,numeric,numeric,GregorianCalendar-method fixed,numeric,numeric,numeric,JulianCalendar-method fixed-method
_Rata Die_ Conversion to and from Gregorian Yearsfixed_from_AD fixed_from_b2k fixed_from_BC fixed_from_BCE fixed_from_BP fixed_from_CE fixed_gregorian fixed_to_AD fixed_to_b2k fixed_to_BC fixed_to_BCE fixed_to_BP fixed_to_CE
_Rata Die_ Conversion to and from Julian Yearsfixed_from_julian fixed_julian fixed_to_julian
Date Conversion to Characterformat format,RataDie-method format,TimeScale-method
Get or Set the Default Calendarget_calendar get_calendar,ANY-method get_calendar-method set_calendar set_calendar,character-method set_calendar,missing-method set_calendar-method
Gregorian CalendarAD b2k BC BCE BP CE gregorian
Heat Mapimage image,TimeSeries-method
Create Time Intervalsintervals intervals,numeric,numeric,TimeScale-method intervals,RataDie,RataDie,missing-method intervals-method
Is an Object a Calendar?is_calendar is_gregorian is_julian
Julian CalendarJ julian
Labelslabels labels,TimeIntervals-method labels,TimeSeries-method
Lengthlength length,TimeIntervals-method
Time Overlapoverlap overlap,TimeIntervals-method overlap-method
Plot Time Series and Time Intervalsplot plot,TimeIntervals,missing-method plot,TimeSeries,missing-method
Pretty Breakpointspretty pretty,RataDie-method
RataDie.RataDie RataDie-class
Create Time Seriesseries series,array,numeric,TimeScale-method series,array,RataDie,missing-method series,data.frame,numeric,TimeScale-method series,data.frame,RataDie,missing-method series,matrix,numeric,TimeScale-method series,matrix,RataDie,missing-method series,numeric,numeric,TimeScale-method series,numeric,RataDie,missing-method series-method
Durationspan span,TimeIntervals-method span,TimeSeries-method span-method
Terminal Timesend,TimeIntervals-method end,TimeSeries-method end-method start start,TimeIntervals-method start,TimeSeries-method start-method
Extract or Replace Parts of an Objectsubset [,RataDie-method [,TimeIntervals-method [,TimeSeries-method
Sampling Timesfrequency,TimeSeries-method frequency-method time time,TimeSeries-method time-method
TimeIntervals.TimeIntervals TimeIntervals-class
TimeScale.TimeScale TimeScale-class
TimeSeries.TimeSeries TimeSeries-class
Time Windowswindow window,TimeSeries-method window-method
Time Series Plotting Functionsyear_axis