This is version 0.3.9, a maintenance and feature update from the current CRAN release (0.3.0). The three long-standing public functions and their required arguments are unchanged. Since 0.3.0 the package:
- adds
statcan_chat(), an optional layer overstatcan_find()that asks a user-configured language-model provider to explain the ranked candidates. It never invents or chooses a table number; those always come fromstatcan_find(). Aproviderargument selects the provider:"openai"(the default, which also covers any OpenAI-compatible or local server) or"anthropic"(Claude). - adds
statcan_chat_continue(), which continues astatcan_chat()result as a multi-turn conversation. Follow-ups stay scoped to the candidate tables the first call found; they do not re-runstatcan_find(), and the API key is re-resolved per call rather than stored in the result object. - fixes
statcan_data()andstatcan_download_data()for tables whose_MetaData.csvfile has several sections with differing column counts, which could previously cause a valid table to be reported as empty. - returns stable column types: a column left blank for a whole table (for
example
DGUID,STATUS,SYMBOL, orTERMINATED) is now an empty character column rather than a logical, all-NAcolumn whose type varied between tables. - speeds up
statcan_find()by caching per-title tokens and streamlining the ranking, without changing the ranking results.
As in 0.3.0, the package performs no Internet access during installation, package loading, examples, tests, or vignette builds. Network requests occur only when a user explicitly calls one of the data-discovery or data-access functions; each request uses a timeout and fails gracefully with an informative error when the service is unavailable or returns an unexpected response. Catalogue and metadata lookups reuse the most recent valid user cache when the service is unavailable.
statcan_chat() follows the same rule: it makes no request unless the user
calls it directly, and it requires a user-supplied API key and model (the
endpoint defaults to the chosen provider). No third-party service is contacted
automatically. For safety the endpoint must use https:// (except loopback
hosts for a local model), and the API key is read only from an argument or an
environment variable (STATCANR_LLM_API_KEY, or the provider's native
OPENAI_API_KEY / ANTHROPIC_API_KEY), never from options().
Thierry Warin is the sole author and maintainer. There is no change of maintainer or maintainer email address from the last CRAN release.
- Local: Ubuntu 24.04 LTS, R 4.6.0 (
R CMD check --as-cran) - GitHub Actions: macOS (release), Windows (release), and Ubuntu (R-devel, release, and oldrel-1) -- all passing
- win-builder, R-release (R 4.6.1): OK -- 0 errors | 0 warnings | 0 notes
- win-builder, R-devel (R Under development, 2026-07-24 r90297): OK -- 0 errors | 0 warnings | 0 notes
0 errors | 0 warnings | 0 notes on the GitHub Actions runners and on both win-builder checks listed above.
The local Linux R CMD check --as-cran reports 1 warning and 2 notes, all of
which are artifacts of that machine's incomplete manual-building toolchain, not
package issues, and do not occur on the GitHub Actions runners or on CRAN:
- WARNING when building the PDF manual: LaTeX package
inconsolata.styis not installed on the local machine. - NOTE that HTML manual validation is skipped because no
tidybinary is present. - NOTE about a leftover
statcanR-manual.tex, a byproduct of the failed local PDF build above.
checking CRAN incoming feasibility returned OK, and all substantive checks
(R code, examples, tests, and vignette re-building) pass cleanly.
statcanR has no reverse dependencies on CRAN (checked with
tools::package_dependencies(reverse = TRUE) against the current CRAN
snapshot), so this update affects no other package. The public function names
and existing required arguments are unchanged.