inst/tinytest/test_convert.R

Sys.setenv(LANGUAGE = "en") # Force locale

## Make conversion functions
BP_to_AD <- convert("BP", "AD")
AD_to_BP <- convert("AD", "BP")

## Convert years
expect_identical(BP_to_AD(0), 1950)
expect_identical(AD_to_BP(1950), 0)

Try the aion package in your browser

Any scripts or data that you put into this service are public.

aion documentation built on June 8, 2025, 1:10 p.m.