Description
Function to read PX-Web data into R via API. The example code reads data from the three national statistical institutes, Statistics Norway, Statistics Sweden and Statistics Finland.
Downloads
CRAN
462
Last 30 days
8431st
1.3K
Last 90 days
9.2K
Last year
Trend: +25.2% (30d vs prior 30d)
r2u
CRAN
9
Last 30 days
27
Last 90 days
143
Last year
Trend: -47.1% (30d vs prior 30d)
CRAN Check Status
13
OK
Show all 13 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check History
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 25, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 24, 2026
ERROR
r-devel-linux-x86_64-debian-gcc
tests
Running ‘testthat.R’ [2s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(PxWebApiData)
>
> test_check("PxWebApiData")
Saving _problems/test-api_data-23.R
[ FAIL 1 | WARN 0 | SKIP 8 | PAS
...[truncated]...
url <- ensure_json_stat2(url) }`: argument is of length zero
Backtrace:
▆
1. └─PxWebApiData::get_api_data(query_url_scb) at test-api_data.R:23:3
[ FAIL 1 | WARN 0 | SKIP 8 | PASS 0 ]
Error:
! Test failures.
Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 4, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 1, 2026
ERROR
r-release-windows-x86_64
examples
Running examples in 'PxWebApiData-Ex.R' failed The error most likely occurred in: > ### Name: api_data > ### Title: PX-Web Data by API > ### Aliases: api_data api_data_1 api_data_2 api_data_12 > > ### ** Examples > > > obj <- api_data(14162, Regi ...[truncated]... non-missing arguments to max; returning -Inf Error in if (nzchar(cand)) strsplit(cand, "\r", fixed = TRUE)[[1]] else NULL : argument is of length zero Calls: api_data_1 ... api_data -> query_url -> meta_frames -> list_to_df_expand Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
Reverse Dependencies (1)
suggests
Dependency Network
Version History
14 tracked
new
1.9.0
Mar 10, 2026
new
0.1.0
Jun 5, 2018