Skip to content

grattanInflators

0.6.0Package record

Inflators for Australian Policy Analysis

1packages depend
6.4Kdownloads / year
91.3%test coverage
13/13flavors OK

Overview

About

Using Australian Bureau of Statistics indices, provides functions that convert historical, nominal statistics to real, contemporary values without worrying about date input quality, performance, or the ABS catalogue.

Changes in 0.6.0

New inflators

  • Added awe_inflator() (all employees' average weekly total earnings) and awote_inflator() (full-time adults' average weekly ordinary time earnings), with original, seasonal and trend data functions and bundled ABS May 2026 data. download_data() includes all six new series.
  • Earnings snapshot preparation selects series by ID using readabs or ABS-Catalogue, without release-specific URLs or workbook-position assumptions.
  • Inflate() and custom/forecast series now support regular half-yearly indices. Periods are anchored to the observation month: May to October and November to April for the earnings series, with the usual exact endpoint checks.

Download and validation fixes

  • Empty or wholly unsupported download_data() requests return integer statuses without creating or advancing the last-update marker.
Show all changes in 0.6.0Hide the rest of the changes in 0.6.0
  • grattanInflators_has_no_data() checks for nonempty files without reading their contents; selecting an index still validates snapshot freshness.
  • Inflator wrappers report invalid index classes through index validation instead of treating them as missing data.

Bug fixes (memory safety)

  • Inflate(x = ) no longer writes past the end of x when x is shorter than from, and no longer requires x to be a double: the length is checked in both R and C, and an integer x is coerced (and so must be read back from the return value).
  • The monthly, quarterly and annual kernels now bounds-check every index position before reading it. An out-of-range date gives NaN. This check is unconditional: check = 0 suppresses diagnostics, never bounds checks.
  • Zero-length inputs no longer read element zero of an empty vector. fast_as_idate(), Inflate() and the internal Year()/YearMonthSplit() return empty results.
  • fast_as_idate() no longer indexes before the start of its month table when the month component is zero or a month name is unrecognised (e.g. "01/00/2024", "01XYZ1948").
  • Loops that call the R API (CHAR(), length()) are no longer run under OpenMP, as most of the R API is not thread-safe.
  • Dates in December 2075, the last month of the supported range, are no longer reported as November: the binary search over the month table could not return its final element. format_idate() produced impossible strings such as "2075-11-61".

Bug fixes (dates)

  • Years are now parsed from all four digits. "2999-01-01" was silently read as 1999; it is now rejected (or NaN when check = 0).
  • A financial year now means the same thing to the input checker and to the converter. Previously, for fy_month >= 7, the two disagreed by one calendar year.
  • An <fy> object now means the same thing as the equivalent "YYYY-YY" string. Previously it lost its class during conversion and was read as January of the ending year, whatever fy_month was.
  • A quarter ("2015-Q1") is now the last month of that quarter everywhere. The checker used Mar/Jun/Sep/Dec and the converter Feb/May/Aug/Nov, which differ on a monthly index.
  • The input checker now accepts exactly the strings the converter can read: a string of any other length (such as "2020"), or with arbitrary bytes in the separator positions, is rejected rather than passed and then silently converted to NaN.
  • A fractional year (cpi_inflator(2015.9, 2016)) is an error rather than being truncated to 2015.

Bug fixes (fast_as_idate)

  • format = "%d-%m-%Y" is now supported, as announced in 0.5.2. guess_format() could return it while the parser did not recognise it and read the date year-first instead.
  • An unrecognised format is now an error rather than being read as "%Y-%m-%d".
  • guess_format() now recognises day-first dates beginning 30 or 31, and reports the separator actually used.
  • check now applies to every format, not only "%Y-%m-%d".

Bug fixes (custom series and forecasting)

  • dr2index() no longer skips the first period after the end of the published series, and no longer adds a period beyond the requested date.
  • .next_date() no longer produces a thirteenth month for a quarterly series anchored in October or November, and clamps the day of the month rather than producing an invalid date.
  • r2index() no longer errors with "object 'next_date' not found".
  • A trailing rate (cpi_original(2030, 0.1, 0.05)) is now dispatched correctly.
  • Rates given as strings keep their sign and exponent: "-5%" was read as +5% and "1e-2" as 12. Rates are now validated against a strict grammar and a rate of -100% or less is rejected.
  • The non-fable fallback extension built one more date than value for annual series (producing a recycling warning and a wrong final row), and used quarterly arithmetic for monthly series. Both are fixed.
  • The fable path restores the data.table thread count with on.exit(), so a modelling error no longer leaves it changed.

Other changes

  • All CPI, wage-price and labour-force series are now bundled with the package, so every inflator works immediately after installation without an internet connection. download_data() continues to store newer copies in the user data directory. A downloaded copy takes precedence only when its observation coverage is at least as recent as the bundled snapshot, so a cache left by an older package version cannot mask newer bundled data.
  • index is now validated before use: it must have date and value columns, at least two rows, strictly increasing dates forming a regular annual, quarterly or monthly sequence, and finite non-zero values. The native code computes a row offset arithmetically, so an irregular or unsorted index would otherwise be read at the wrong position.
  • A downloaded series is fully parsed and validated before it replaces the cached file, the replacement is a same-filesystem rename (with the previous version kept alongside as .bak), and the in-memory copy of a refreshed series is dropped so that download_data() takes effect within a session.
  • GET_SERIES_FY() no longer adds an fy column by reference to the cached series.
  • The test suite now runs the exported inflators on every platform, including machines without internet access, using the bundled ABS data.
  • Removed a unit test that had been gated on a date now past, and so had stopped running.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.5 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.6.0
READMEYes · 169 wordsVignettesNoNEWSYes · 100% structured · mentions 0.6.0Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
9 (1 internal)includes a package overview page
Examples that run
100%4 run in a plain check
Exported functions with examples
50%
Documented parameters
76%
Return-value docs
100%
Help pages citing references
0%

Downloads

6.4K
CRAN downloads in the past year
Rank #7,717 · ~18/day · ~534/mo
Daily download trend is not available in this view yet.
49330 days
1.1K90 days
6.4K1 year
Compare downloads with other packages →
Also on389 r2u5 autocran

Dependencies

Declared dependencies
8 external dependencies (excludes base and recommended)

Installing grattanInflators adds 5 packages (3 with compiled code, 6.1 MB of source tarballs). Heaviest: data.table 5.7 MB, magrittr 275 KB, hutils 123 KB.

Depends (1)
R >= 4.0.0
Imports (5)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Depends, Imports or LinkingTo, most downloaded first

Datasets

People & History

People (1)
Author, Maintainer since 0.3.1 (2023)
Releases (9)

Pick two releases to compare their code metrics.

  • 0.6.0Latest
    record
    2026-09-11 · current release · diff ↗ ·
    added 8 exports
    awe_inflator, awe_original, awe_seasonal, awe_trend, awote_inflator, awote_original, awote_seasonal, awote_trend
  • R
    R 4.6.0 released · 2026-04-24
  • 0.5.7
    record
    2026-01-12 · diff ↗ ·
    added 1 export
    grattanInflators_has_no_data
  • R
    R 4.5.0 released · 2025-04-11
  • 0.5.4
    record
    2024-08-21 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 0.5.3
    record
    2024-04-23 · diff ↗
  • 0.5.1
    record
    2024-03-26 · diff ↗
  • 0.5.0
    record
    2023-12-01 · diff ↗
  • 0.4.2
    record
    2023-08-23 · diff ↗
  • 0.4.0
    record
    2023-08-18 · diff ↗ ·
    added 13 exports
    cpi_monthly_excl_volatile, cpi_monthly_original, cpi_monthly_seasonal, cpi_original, cpi_seasonal, cpi_trimmed_mean, dr2index, lfi_original, lfi_seasonal, lfi_trend, wpi_original, wpi_seasonal, wpi_trend
  • 0.3.1
    record
    2023-06-12
  • R
    R 4.3.0 released · 2023-04-21

Package metadata

First published
2023-06-12
Total releases
9 / 3 yrs
License
GPL-2 OSI
Minimum R
≥ 4.0.0
Download size
92 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("grattanInflators")
Parsonage, H. (2026). grattanInflators: Inflators for Australian Policy Analysis (Version 0.6.0) [Computer software]. https://doi.org/10.32614/CRAN.package.grattanInflators

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for grattanInflators version 0.6.0 [Data set]. HJJB, LLC. Data release v2026-10-20. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy