Skip to contents

fred 0.3.1

Resubmission of 0.3.0, which CRAN’s incoming checks rejected on 2026-09-08. Two problems, both now fixed.

  • The donttest additional check ran fred_all_vintages() on a machine with no FRED_API_KEY and it aborted rather than failing gracefully. 0.3.0 wrapped 14 example blocks in try() but missed 14 more, including every vintage helper and fred_get_key() itself. All of them are wrapped now. Verified by extracting every generated example with tools::Rd2ex(commentDonttest = FALSE) and running all 35 with the API key unset: none errors.

  • inst/CITATION carried doi = "10.5281/zenodo.fred", a placeholder that was never replaced with a real deposit. It resolves to 404 on both CrossRef and DataCite, which CRAN flagged as an invalid DOI. There is no Zenodo record for this package, so the field has been removed rather than corrected.

fred 0.3.0

A research-grade upgrade in three logical blocks: (1) discoverability and reference data, (2) workflow utilities and the default plot method, and (3) reproducibility helpers. 35 exports + 4 S3 methods, 275 tests, three new vignettes.

Examples now fail gracefully when the FRED API is unreachable

Every \donttest{} example that reaches the FRED API is wrapped in try(). 14 blocks were affected. CRAN runs these in its additional-issues donttest check, on build machines the upstream host routinely refuses or rate-limits, and an example that could not reach it was an ERROR rather than a printed condition. The options(op) cache restore stays outside the try() so it runs either way.

This is the CRAN Repository Policy requirement that a package using an internet resource fail gracefully when the resource is unavailable. It is the rule obr was archived under on 2026-08-22.

Discoverability and reference data

Workflow utilities and plotting

  • New fred_event_window() extracts data inside a c(before, after) day window around event dates. Works on both long and wide format. Handy for event studies around FOMC decisions, recession peaks, or release dates.
  • New fred_aggregate() aggregates long or wide format data to a coarser calendar frequency (week / month / quarter / year) using mean, sum, first, last, median, min, or max. Complements server-side aggregation in fred_series(frequency = ...).
  • New fred_interpolate() fills NA values via last-observation-carry- forward ("locf") or linear interpolation ("linear"). Useful for mixed-frequency analysis.
  • New plot.fred_tbl() default plot method. Detects long or wide format, draws one line per series, and shades NBER recession periods. Uses base graphics: no ggplot2 dependency.

Reproducibility helpers

  • New fred_cite_series() produces a citation for a FRED series in BibTeX, plain text, or bibentry form. Works offline (falls back to the series ID as the title); pass fetch_metadata = TRUE to use the official series title from fred_info(). Supports vintage-date pinning so cited data is reproducible even after revisions.
  • New fred_manifest() snapshots one or more fred_tbl objects as a YAML manifest with query metadata, dimensions, date range, and an MD5 hash of each object. Saving the manifest alongside paper code lets reviewers verify that the underlying data is unchanged.
  • New fred_vintage_revisions() returns per-observation revision summary statistics (n_vintages, first/final value, total revision, mean/SD of inter-vintage changes, days to final). Useful for choosing low-revision series for nowcasting and real-time analysis.

Vignettes

  • New vignette multi-series-workflows: fetch, transform, widen, plot.
  • New vignette nowcasting-with-fred: pseudo-real-time GDP nowcasting using monthly indicators, with vintage-aware backtesting (pairs with the nowcast package).
  • New vignette inflation-revisions: tracking core inflation revisions using fred_real_time_panel() aligned to FOMC SEP meeting dates.

Documentation

  • CITATION updated to v0.3.0 (was outdated against 0.1.0).
  • New CITATION.cff file at the repository root for the GitHub citation widget and Zenodo deposit workflow.

fred 0.2.0

CRAN release: 2026-04-11

New features

  • fred_series() gains a format argument. Pass format = "wide" to get one row per date with a column per series, instead of the default long layout.
  • fred_series() gains a transform argument with readable aliases for the FRED units codes: "level", "diff", "yoy_diff", "qoq_pct", "yoy_pct", "annualised", "log", "log_diff", and more. The raw units codes still work; transform and units are mutually exclusive.
  • New real-time and vintage helpers built on the ALFRED endpoint:
  • New fred_cache_info() reports the cache directory, file count, total size, and per-file metadata. Useful for debugging stale results.
  • All observation results are now returned as fred_tbl, a thin data.frame subclass with a one-line provenance header showing the query (series count, observation count, units, transform, frequency, vintage). The header is informational; downstream code can keep treating the result as a plain data frame.

Internals

  • The cache key format is unchanged for default arguments, so caches built under 0.1.x are still picked up after upgrade. Realtime, output-type, and vintage requests are cached under distinct keys.

fred 0.1.2

CRAN release: 2026-03-19

  • Removed non-existent pkgdown URL from DESCRIPTION.

fred 0.1.1

  • Examples now use \donttest with tempdir() cache instead of \dontrun, fixing CRAN policy compliance.
  • Cache directory is now configurable via options(fred.cache_dir = ...).

fred 0.1.0

  • Initial CRAN release.
  • Core function fred_series() for fetching one or more FRED time series.
  • Server-side unit transformations and frequency aggregation.
  • Local caching of downloaded data.
  • Search, category, release, source, tag, and vintage endpoints.