Package: datey 0.1.0

Tim Gordon
datey: Exact Date and Duration Arithmetic on an Annual Grid
Standardised mapping of dates onto a discrete annual grid, together with exact date and duration arithmetic. This matters when the primary unit is years but the input data uses dates. Examples are actuarial mortality experience analysis and valuation of life assurance and annuities, for which mortality rates are defined per year but experience and valuation data are typically defined using dates.
Authors:
datey_0.1.0.tar.gz
datey_0.1.0.tar.gz(r-4.7-arm64)datey_0.1.0.tar.gz(r-4.7-x86_64)datey_0.1.0.tar.gz(r-4.6-arm64)datey_0.1.0.tar.gz(r-4.6-x86_64)
datey_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
datey/json (API)
| # Install 'datey' in R: |
| install.packages('datey', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/logmu-org/r-datey/issues
Pkgdown/docs site:https://r-datey.logmu.org
Last updated from:64c18c6813. Checks:6 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-arm64 | OK | 136 | ||
| linux-devel-x86_64 | OK | 143 | ||
| source / vignettes | OK | 198 | ||
| linux-release-arm64 | OK | 145 | ||
| linux-release-x86_64 | OK | 133 | ||
| wasm-release | OK | 123 |
Exports:%includes%%to%all_collapsedall_of_timeall_properany_collapseddateydatey_intervaldurationyend_dayinterval_includesis_collapsedis_dateyis_datey_intervalis_durationyis_leap_yearis_mid_dayis_properis_start_daymid_dayNA_datey_NA_datey_interval_NA_durationy_start_dayto_ymdfvalid_duration_years_maxvalid_years_endvalid_years_start
Dependencies:cpp11
Last update: 2026-07-07
Started: 2026-07-07
Last update: 2026-07-07
Started: 2026-07-07
Last update: 2026-07-07
Started: 2026-07-07
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| 'All of time' — the maximum valid 'datey_interval' | all_of_time |
| Convert a 'datey' to calendar years (including fractional part) | as.double.datey as.integer.datey as_years_datey |
| Convert a 'durationy' to duration in years | as.double.durationy as.integer.durationy as_years_durationy |
| Combine multiple 'datey', 'durationy' or 'datey_interval' vectors | c.datey c.datey_interval c.durationy combine |
| Create a 'datey' | datey datey.character datey.Date datey.datey datey.default datey.double datey.integer datey.POSIXct datey.POSIXlt end_day mid_day start_day |
| Get year, month, day or day_fraction breakdown of a 'datey' | $.datey datey_components to_ymdf |
| Create a 'datey_interval' | %to% datey_interval datey_interval.datey datey_interval.datey_interval datey_interval.default datey_interval.double datey_interval.integer datey_interval.logical |
| Create a 'durationy' from an annual duration | durationy durationy.character durationy.datey_interval durationy.default durationy.double durationy.durationy durationy.integer |
| Integer constants | integer_constants valid_duration_years_max valid_years_end valid_years_start |
| Whether a 'datey_interval' includes a 'datey' | %includes% interval_includes |
| Properties of a 'datey_interval' | all_collapsed all_collapsed.datey_interval all_collapsed.default all_proper all_proper.datey_interval all_proper.default any_collapsed any_collapsed.datey_interval any_collapsed.default interval_nature is_collapsed is_collapsed.datey_interval is_collapsed.default is_proper is_proper.datey_interval is_proper.default |
| Get the start, end or duration of a 'datey_interval' | $.datey_interval interval_properties |
| Is 'x' a leap year? | is_leap_year is_leap_year.Date is_leap_year.datey is_leap_year.default is_leap_year.double is_leap_year.integer is_leap_year.POSIXct is_leap_year.POSIXlt |
| Whether 'datey', 'durationy' or 'datey_interval' are NA | anyNA.datey anyNA.datey_interval anyNA.durationy is.na.datey is.na.datey_interval is.na.durationy is_NA |
| Is 'x' a 'datey', 'durationy' or 'datey_interval'? | is_datey is_datey_interval is_durationy is_type |
| Is a 'datey' the start (or end) or middle of a day? | is_mid_day is_start_day is_xxx_day |
| Minimum, maximum or range of 'datey' or 'durationy' | max_min Summary.datey Summary.datey_interval Summary.durationy |
| Mean value of 'datey' or 'durationy' | mean mean.datey mean.datey_interval mean.durationy |
| The 'datey', 'durationy' and 'datey_interval' versions of NA | NAs NA_datey_ NA_datey_interval_ NA_durationy_ |
| Operators for 'datey', 'durationy' and 'datey_interval' | ops Ops.datey_type |
| Create 'datey' or 'durationy' sequence vector | seq seq.datey seq.durationy |
| Subset 'datey', 'durationy' or 'datey_interval' vectors | subset [.datey [.datey_interval [.durationy [<-.datey [<-.datey_interval [<-.durationy |
| Format or print a 'datey' | as.character.datey format.datey print.datey text_from_datey |
| Format or print a 'datey_interval' | as.character.datey_interval format.datey_interval print.datey_interval text_from_datey_interval |
| Format or print a 'durationy' | as.character.durationy format.durationy print.durationy text_from_durationy |