- using R version 4.5.2 (2025-10-31)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-14 (Debian 14.3.0-10) 14.3.0
GNU Fortran (Debian 14.3.0-10) 14.3.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘klassR/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘klassR’ version ‘1.0.4’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘klassR’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [0s/0s] OK
- checking whether the package can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the package can be unloaded cleanly ... [0s/0s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the namespace can be unloaded cleanly ... [0s/0s] OK
- checking loading without being on the library search path ... [0s/0s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [6s/7s] OK
- checking Rd files ... [0s/1s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... [0s/0s] OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking examples ... [0s/61s] ERROR
Running examples in ‘klassR-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: apply_klass
> ### Title: Match and convert a classification
> ### Aliases: apply_klass ApplyKlass
>
> ### ** Examples
>
> data(klassdata)
> kommune_names <- apply_klass(
+ x = klassdata$kommune,
+ classification = 131,
+ language = "en",
+ format = FALSE
+ )
Connection failed with error code 502
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [55s/451s] ERROR
Running ‘testthat.R’ [55s/450s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(klassR)
>
> test_check("klassR")
Connection failed with error code 502
Saving _problems/test_ApplyKlass-26.R
Connection failed with error code 502
Saving _problems/test_ApplyKlass-47.R
Connection failed with error code 502
Saving _problems/test_ApplyKlass-54.R
Connection failed with error code 502
Saving _problems/test_ApplyKlass-63.R
Connection failed with error code 502
Saving _problems/test_ApplyKlass-70.R
Connection failed with error code 502
Saving _problems/test_ApplyKlass-84.R
Connection failed with error code 502
Saving _problems/test_ApplyKlass-168.R
Connection failed with error code 502
Saving _problems/test_GetKlass-60.R
Saving _problems/test_GetKlass-79.R
Saving _problems/test_GetKlass-92.R
Connection failed with error code 502
Saving _problems/test_GetKlass-99.R
Saving _problems/test_GetKlass-107.R
Connection failed with error code 404
Connection failed with error code 502
Saving _problems/test_GetKlass-145.R
Connection failed with error code 502
Saving _problems/test_GetKlass-152.R
Connection failed with error code 502
Saving _problems/test_GetKlass-158.R
Connection failed with error code 502
Connection failed with error code 502
Saving _problems/test_ListKlass-15.R
Connection failed with error code 502
Saving _problems/test_ListKlass-18.R
Connection failed with error code 502
Saving _problems/test_ListKlass-24.R
[ FAIL 18 | WARN 0 | SKIP 0 | PASS 63 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test_ApplyKlass.R:23:3'): apply_klass returns correct names for character codes ──
Error in `stop_quietly()`:
Backtrace:
▆
1. └─klassR::apply_klass(...) at test_ApplyKlass.R:23:3
2. └─klassR::get_klass(...)
3. └─klassR:::stop_quietly()
── Error ('test_ApplyKlass.R:41:3'): apply_klass returns correct language ──────
Error in `stop_quietly()`:
Backtrace:
▆
1. └─klassR::apply_klass(...) at test_ApplyKlass.R:41:3
2. └─klassR::get_klass(...)
3. └─klassR:::stop_quietly()
── Error ('test_ApplyKlass.R:54:3'): apply_klass returns correctly for character codes ──
Error in `stop_quietly()`:
Backtrace:
▆
1. └─klassR::apply_klass(sektor, 39, date = "2020-01-01") at test_ApplyKlass.R:54:3
2. └─klassR::get_klass(...)
3. └─klassR:::stop_quietly()
── Error ('test_ApplyKlass.R:63:3'): Check levelCheck for numerical codes ──────
Error in `stop_quietly()`:
Backtrace:
▆
1. └─klassR::get_klass(6, date = "2020-01-01") at test_ApplyKlass.R:63:3
2. └─klassR:::stop_quietly()
── Error ('test_ApplyKlass.R:70:3'): Check levelCheck for character codes ──────
Error in `stop_quietly()`:
Backtrace:
▆
1. └─klassR::get_klass(39, date = "2020-01-01") at test_ApplyKlass.R:70:3
2. └─klassR:::stop_quietly()
── Error ('test_ApplyKlass.R:80:3'): apply_klass can return a variant classification ──
Error in `stop_quietly()`:
Backtrace:
▆
1. └─klassR::apply_klass(...) at test_ApplyKlass.R:80:3
2. └─klassR::get_klass(...)
3. └─klassR:::stop_quietly()
── Error ('test_ApplyKlass.R:165:3'): Municipality classification with missing formatting ──
Error in `stop_quietly()`:
Backtrace:
▆
1. ├─testthat::expect_warning(...) at test_ApplyKlass.R:165:3
2. │ └─testthat:::expect_condition_matching_(...)
3. │ └─testthat:::quasi_capture(...)
4. │ ├─testthat (local) .capture(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
7. └─klassR::apply_klass(dat, classification = 131, date = "2024-01-01")
8. └─klassR::get_klass(...)
9. └─klassR:::stop_quietly()
── Error ('test_GetKlass.R:57:3'): get_klass returns correct output level ──────
Error in `stop_quietly()`:
Backtrace:
▆
1. └─klassR::get_klass(7, date = "2024-01-01", output_level = 1) at test_GetKlass.R:57:3
2. └─klassR:::stop_quietly()
── Error ('test_GetKlass.R:76:3'): get_klass returns a correspondence table ────
Error: lexical error: invalid char in json text.
<!DOCTYPE HTML PUBLIC "-//IETF/
(right here) ------^
Backtrace:
▆
1. └─klassR::get_klass(104, correspond = 131, date = "2015-01-01") at test_GetKlass.R:76:3
2. └─jsonlite::fromJSON(klass_text, flatten = TRUE)
3. └─jsonlite:::parse_and_simplify(...)
4. └─jsonlite:::parseJSON(txt, bigint_as_char)
5. └─jsonlite:::parse_string(txt, bigint_as_char)
── Error ('test_GetKlass.R:89:3'): get_klass returns a correspondence table in both directions ──
Error: lexical error: invalid char in json text.
<!DOCTYPE HTML PUBLIC "-//IETF/
(right here) ------^
Backtrace:
▆
1. └─klassR::get_klass(131, correspond = 104, date = "2020-02-01") at test_GetKlass.R:89:3
2. └─jsonlite::fromJSON(klass_text, flatten = TRUE)
3. └─jsonlite:::parse_and_simplify(...)
4. └─jsonlite:::parseJSON(txt, bigint_as_char)
5. └─jsonlite:::parse_string(txt, bigint_as_char)
── Error ('test_GetKlass.R:99:3'): get_klass returns a valid variant including ones with spaces in name ──
Error in `stop_quietly()`:
Backtrace:
▆
1. └─klassR::get_klass(6, variant = 1616, date = "2021-01-02") at test_GetKlass.R:99:3
2. └─klassR:::stop_quietly()
── Error ('test_GetKlass.R:107:3'): get_klass returns a correspondence table ───
Error: lexical error: invalid char in json text.
<!DOCTYPE HTML PUBLIC "-//IETF/
(right here) ------^
Backtrace:
▆
1. └─klassR::get_klass(131, correspond = 127, date = "2024-01-02") at test_GetKlass.R:107:3
2. └─jsonlite::fromJSON(klass_text, flatten = TRUE)
3. └─jsonlite:::parse_and_simplify(...)
4. └─jsonlite:::parseJSON(txt, bigint_as_char)
5. └─jsonlite:::parse_string(txt, bigint_as_char)
── Error ('test_GetKlass.R:145:3'): get_klass returns notes when requested ─────
Error in `stop_quietly()`:
Backtrace:
▆
1. └─klassR::get_klass(277, notes = TRUE, date = "2023-01-12") at test_GetKlass.R:145:3
2. └─klassR:::stop_quietly()
── Error ('test_GetKlass.R:152:3'): get_klass returns a future classification ──
Error in `stop_quietly()`:
Backtrace:
▆
1. ├─testthat::expect_message(classdata <- get_klass(104, date = "2050-01-01")) at test_GetKlass.R:152:3
2. │ └─testthat:::expect_condition_matching_(...)
3. │ └─testthat:::quasi_capture(...)
4. │ ├─testthat (local) .capture(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
7. └─klassR::get_klass(104, date = "2050-01-01")
8. └─klassR:::stop_quietly()
── Error ('test_GetKlass.R:158:3'): get_klass returns a correspondence table using ID ──
Error in `stop_quietly()`:
Backtrace:
▆
1. ├─testthat::expect_message(...) at test_GetKlass.R:158:3
2. │ └─testthat:::expect_condition_matching_(...)
3. │ └─testthat:::quasi_capture(...)
4. │ ├─testthat (local) .capture(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
7. └─klassR::get_klass(correspondID = 1111, date = "2023-01-12")
8. └─klassR:::stop_quietly()
── Failure ('test_ListKlass.R:15:3'): list_klass returns a list ────────────────
Expected `nrow(klass_table)` > 1.
Actual comparison: 0.0 <= 1.0
Difference: -1.0 <= 0
── Failure ('test_ListKlass.R:18:3'): list_klass returns a list ────────────────
Expected `nrow(codelist_table)` > `nrow(klass_table)`.
Actual comparison: 0 <= 0
Difference: 0 <= 0
── Error ('test_ListKlass.R:24:3'): search_klass returns searches ──────────────
Error in `expect_in("Standard for kommuneinndeling", komm_search$klass_name)`: `expected` must be a vector, not `NULL`.
Backtrace:
▆
1. └─testthat::expect_in(expected = komm_search$klass_name) at test_ListKlass.R:24:3
2. └─testthat:::check_vector(exp$val, error_arg = "expected")
3. └─testthat:::stop_input_type(x, "a vector", arg = error_arg, call = error_call)
4. └─rlang::abort(message, ..., call = call, arg = arg)
[ FAIL 18 | WARN 0 | SKIP 0 | PASS 63 ]
Error:
! Test failures.
Execution halted
- checking PDF version of manual ... [5s/7s] OK
- checking HTML version of manual ... [1s/2s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs