* using log directory 'd:/Rcompile/CRANpkg/local/4.7/frequency.Rcheck' * using R Under development (unstable) (2026-04-29 r89977 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 14.3.0 GNU Fortran (GCC) 14.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * current time: 2026-04-30 13:34:58 UTC * checking for file 'frequency/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'frequency' version '0.4.1' * 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 hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'frequency' can be installed ... OK * checking installed package size ... OK * checking package directory ... 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 ... [2s] OK * checking whether the package can be loaded with stated dependencies ... [2s] OK * checking whether the package can be unloaded cleanly ... [2s] OK * checking whether the namespace can be loaded with stated dependencies ... [2s] OK * checking whether the namespace can be unloaded cleanly ... [2s] OK * checking loading without being on the library search path ... [2s] OK * checking whether startup messages can be suppressed ... [2s] 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] OK * checking Rd files ... [0s] OK * checking Rd metadata ... 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 ... [1s] OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... [2s] ERROR Running examples in 'frequency-Ex.R' failed The error most likely occurred in: > ### Name: freq > ### Title: Freq > ### Aliases: freq > > ### ** Examples > > > # Suppress external output for examples > options(frequency_render = FALSE) > > # Create frequency tables for the entire dataset > freq(big5) Building tables | | | 0% | |= | 2%Error in as.data.frame.integer(x[[i]], optional = TRUE) : row names contain missing values Calls: freq ... data.frame -> as.data.frame -> as.data.frame.integer Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [4s] ERROR Running 'testthat.R' [3s] Running the tests in 'tests/testthat.R' failed. Complete output: > Sys.setenv("R_TESTS" = "") > # Sys.setenv(LC_COLLATE = "C", LC_TIME = "C", LANGUAGE = "en") > Sys.setenv(LC_COLLATE = "C") > > print(Sys.getlocale(category = "LC_ALL")) [1] "LC_COLLATE=C;LC_CTYPE=German_Germany.utf8;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=C" > Sys.setlocale("LC_COLLATE", "C") # R CMD check uses this default [1] "C" > # Sys.setlocale("LC_COLLATE", "en_US.UTF-8") > # Sys.setlocale("LC_COLLATE", "English_United States.1252") > print(Sys.getlocale(category = "LC_ALL")) [1] "LC_COLLATE=C;LC_CTYPE=German_Germany.utf8;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=C" > > library(testthat) > library(frequency) Loading required package: rmarkdown Loading required package: knitr Loading required package: DT Loading required package: ggplot2 > test_check("frequency") [1] "LC_COLLATE=C;LC_CTYPE=German_Germany.utf8;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=C" [1] "LC_COLLATE=C;LC_CTYPE=German_Germany.utf8;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=C" id test_numeric test_numeric_labelled 1 1 100 1 2 2 1000 2 3 3 10000 2 4 4 1 3 5 5 1 3 6 6 1 3 7 7 100 4 8 8 9 4 9 9 99 4 10 10 999 4 11 11 9999 5 12 12 99999 5 13 13 999999 5 14 14 100000 5 15 15 1000000 5 16 16 9 6 17 17 123 7 18 18 NA NA 19 19 NA NA 20 20 NA NA test_character 1 VIC 2 VIC 3 NSW 4 Vic 5 WA 6 WA 7 TAS 8 SA 9 VIC 10 ACT 11 ACT 12 QLD 13 NT 14 NULL 15 NA 16 Not Stated 17 Not Stated 18 19 20 . test_character_labelled 1 VIC 2 VIC 3 NSW 4 Vic 5 WA 6 WA 7 TAS 8 SA 9 VIC 10 ACT 11 ACT 12 QLD 13 NT 14 NULL 15 NA 16 Not Stated 17 Not Stated 18 19 20 . 'data.frame': 20 obs. of 5 variables: $ id : num 1 2 3 4 5 6 7 8 9 10 ... $ test_numeric : num 100 1000 10000 1 1 1 100 9 99 999 ... $ test_numeric_labelled : num 1 2 2 3 3 3 4 4 4 4 ... ..- attr(*, "value.labels")= Named chr [1:5] "5" "4" "3" "2" ... .. ..- attr(*, "names")= chr [1:5] "Five" "Four" "Three" "Two" ... $ test_character : Factor w/ 14 levels " ",..: 12 12 5 13 14 14 11 10 12 3 ... $ test_character_labelled: Factor w/ 14 levels " ",..: 12 12 5 13 14 14 11 10 12 3 ... - attr(*, "variable.labels")= Named chr [1:5] "" "Numeric Variable" "Partly Labelled Numeric Variable" "Character Variable" ... ..- attr(*, "names")= chr [1:5] "id" "test_numeric" "test_numeric_labelled" "test_character" ... - attr(*, "codepage")= int 65001 NULL id test_numeric test_numeric_labelled 1 1 100 1 2 2 1000 2 3 3 10000 2 4 4 1 3 5 5 1 3 6 6 1 3 7 7 100 4 8 8 9 4 9 9 99 4 10 10 999 4 11 11 9999 5 12 12 99999 5 13 13 999999 5 14 14 100000 5 15 15 1000000 5 16 16 9 6 17 17 123 7 18 18 NA NA 19 19 NA NA 20 20 NA NA test_character 1 VIC 2 VIC 3 NSW 4 Vic 5 WA 6 WA 7 TAS 8 SA 9 VIC 10 ACT 11 ACT 12 QLD 13 NT 14 NULL 15 NA 16 Not Stated 17 Not Stated 18 19 20 . test_character_labelled 1 VIC 2 VIC 3 NSW 4 Vic 5 WA 6 WA 7 TAS 8 SA 9 VIC 10 ACT 11 ACT 12 QLD 13 NT 14 NULL 15 NA 16 Not Stated 17 Not Stated 18 19 20 . 'data.frame': 20 obs. of 5 variables: $ id : num 1 2 3 4 5 6 7 8 9 10 ... $ test_numeric : num 100 1000 10000 1 1 1 100 9 99 999 ... $ test_numeric_labelled : num 1 2 2 3 3 3 4 4 4 4 ... ..- attr(*, "value.labels")= Named chr [1:5] "5" "4" "3" "2" ... .. ..- attr(*, "names")= chr [1:5] "Five" "Four" "Three" "Two" ... $ test_character : Factor w/ 14 levels " ",..: 12 12 5 13 14 14 11 10 12 3 ... $ test_character_labelled: Factor w/ 14 levels " ",..: 12 12 5 13 14 14 11 10 12 3 ... - attr(*, "variable.labels")= Named chr [1:5] "" "Numeric Variable" "Partly Labelled Numeric Variable" "Character Variable" ... ..- attr(*, "names")= chr [1:5] "id" "test_numeric" "test_numeric_labelled" "test_character" ... - attr(*, "codepage")= int 65001 NULL | | | 0% | |============== | 20%Saving _problems/tests-38.R | | | 0% | |======================================================================| 100%Saving _problems/tests-44.R [1] "Foreign: df vs list" | | | 0% | |============== | 20%Saving _problems/tests-87.R | | | 0% | |=================================== | 50%Saving _problems/tests-105.R | | | 0% | |=================================== | 50%Saving _problems/tests-110.R | | | 0% | |======================================================================| 100%Saving _problems/tests-116.R | | | 0% | |======================================================================| 100%Saving _problems/tests-117.R | | | 0% | |=================================== | 50%Saving _problems/tests-157.R | | | 0% | |=================================== | 50%Saving _problems/tests-158.R | | | 0% | |=================================== | 50%Saving _problems/tests-159.R | | | 0% | |=================================== | 50%Saving _problems/tests-160.R | | | 0% | |=================================== | 50%Saving _problems/tests-161.R [ FAIL 12 | WARN 0 | SKIP 2 | PASS 5 ] ══ Skipped tests (2) ═══════════════════════════════════════════════════════════ • On CRAN (2): 'tests.R:122:3', 'tests.R:166:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('tests.R:38:3'): All ───────────────────────────────────────────────── Error in `as.data.frame.integer(x[[i]], optional = TRUE)`: row names contain missing values Backtrace: ▆ 1. ├─testthat::expect_equal(raw_all, freq(dat)) at tests.R:38:3 2. │ └─testthat::quasi_label(enquo(expected), expected.label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─frequency::freq(dat) 5. └─frequency:::lapply_pb(...) 6. └─base::lapply(X, wrapper, ...) 7. └─frequency (local) FUN(X[[i]], ...) 8. └─frequency (local) FUN(...) 9. └─frequency:::makefreqs(x1, y, maxrow1, trim1) 10. ├─base::as.data.frame(table(x[[var]], useNA = "always"), stringsAsFactors = FALSE) 11. └─base::as.data.frame.table(...) 12. ├─base::eval(ex) 13. │ └─base::eval(ex) 14. └─base::data.frame(...) 15. ├─base::as.data.frame(x[[i]], optional = TRUE) 16. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ── Error ('tests.R:44:3'): Individual tables ─────────────────────────────────── Error in `as.data.frame.integer(x[[i]], optional = TRUE)`: row names contain missing values Backtrace: ▆ 1. ├─testthat::expect_equal(raw_id, freq(dat$id)) at tests.R:44:3 2. │ └─testthat::quasi_label(enquo(expected), expected.label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─frequency::freq(dat$id) 5. └─frequency:::lapply_pb(...) 6. └─base::lapply(X, wrapper, ...) 7. └─frequency (local) FUN(X[[i]], ...) 8. └─frequency (local) FUN(...) 9. └─frequency:::makefreqs(x1, y, maxrow1, trim1) 10. ├─base::as.data.frame(table(x[[var]], useNA = "always"), stringsAsFactors = FALSE) 11. └─base::as.data.frame.table(...) 12. ├─base::eval(ex) 13. │ └─base::eval(ex) 14. └─base::data.frame(...) 15. ├─base::as.data.frame(x[[i]], optional = TRUE) 16. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ── Error ('tests.R:87:3'): foreign_df vs foreign_list ────────────────────────── Error in `as.data.frame.integer(x[[i]], optional = TRUE)`: row names contain missing values Backtrace: ▆ 1. ├─base::print(freq(foreign_df)) at tests.R:87:3 2. └─frequency::freq(foreign_df) 3. └─frequency:::lapply_pb(...) 4. └─base::lapply(X, wrapper, ...) 5. └─frequency (local) FUN(X[[i]], ...) 6. └─frequency (local) FUN(...) 7. └─frequency:::makefreqs(x1, y, maxrow1, trim1) 8. ├─base::as.data.frame(table(x[[var]], useNA = "always"), stringsAsFactors = FALSE) 9. └─base::as.data.frame.table(...) 10. ├─base::eval(ex) 11. │ └─base::eval(ex) 12. └─base::data.frame(...) 13. ├─base::as.data.frame(x[[i]], optional = TRUE) 14. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ── Failure ('tests.R:105:3'): Arguments - x = ───────────────────────────────── `freq(df)` threw an error. Message: row names contain missing values Class: simpleError/error/condition Backtrace: ▆ 1. ├─testthat::expect_error(freq(df), NA) at tests.R:105:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─frequency::freq(df) 7. └─frequency:::lapply_pb(...) 8. └─base::lapply(X, wrapper, ...) 9. └─frequency (local) FUN(X[[i]], ...) 10. └─frequency (local) FUN(...) 11. └─frequency:::makefreqs(x1, y, maxrow1, trim1) 12. ├─base::as.data.frame(table(x[[var]], useNA = "always"), stringsAsFactors = FALSE) 13. └─base::as.data.frame.table(...) 14. ├─base::eval(ex) 15. │ └─base::eval(ex) 16. └─base::data.frame(...) 17. ├─base::as.data.frame(x[[i]], optional = TRUE) 18. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ── Failure ('tests.R:110:3'): Arguments - x = ───────────────────────────────── `freq(dat)` threw an error. Message: row names contain missing values Class: simpleError/error/condition Backtrace: ▆ 1. ├─testthat::expect_error(freq(dat), NA) at tests.R:110:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─frequency::freq(dat) 7. └─frequency:::lapply_pb(...) 8. └─base::lapply(X, wrapper, ...) 9. └─frequency (local) FUN(X[[i]], ...) 10. └─frequency (local) FUN(...) 11. └─frequency:::makefreqs(x1, y, maxrow1, trim1) 12. ├─base::as.data.frame(table(x[[var]], useNA = "always"), stringsAsFactors = FALSE) 13. └─base::as.data.frame.table(...) 14. ├─base::eval(ex) 15. │ └─base::eval(ex) 16. └─base::data.frame(...) 17. ├─base::as.data.frame(x[[i]], optional = TRUE) 18. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ── Failure ('tests.R:116:3'): Arguments - x = ───────────────────────────────── `freq(vs)` threw an error. Message: row names contain missing values Class: simpleError/error/condition Backtrace: ▆ 1. ├─testthat::expect_error(freq(vs), NA) at tests.R:116:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─frequency::freq(vs) 7. └─frequency:::lapply_pb(...) 8. └─base::lapply(X, wrapper, ...) 9. └─frequency (local) FUN(X[[i]], ...) 10. └─frequency (local) FUN(...) 11. └─frequency:::makefreqs(x1, y, maxrow1, trim1) 12. ├─base::as.data.frame(table(x[[var]], useNA = "always"), stringsAsFactors = FALSE) 13. └─base::as.data.frame.table(...) 14. ├─base::eval(ex) 15. │ └─base::eval(ex) 16. └─base::data.frame(...) 17. ├─base::as.data.frame(x[[i]], optional = TRUE) 18. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ── Failure ('tests.R:117:3'): Arguments - x = ───────────────────────────────── `freq(vn)` threw an error. Message: row names contain missing values Class: simpleError/error/condition Backtrace: ▆ 1. ├─testthat::expect_error(freq(vn), NA) at tests.R:117:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─frequency::freq(vn) 7. └─frequency:::lapply_pb(...) 8. └─base::lapply(X, wrapper, ...) 9. └─frequency (local) FUN(X[[i]], ...) 10. └─frequency (local) FUN(...) 11. └─frequency:::makefreqs(x1, y, maxrow1, trim1) 12. ├─base::as.data.frame(table(x[[var]], useNA = "always"), stringsAsFactors = FALSE) 13. └─base::as.data.frame.table(...) 14. ├─base::eval(ex) 15. │ └─base::eval(ex) 16. └─base::data.frame(...) 17. ├─base::as.data.frame(x[[i]], optional = TRUE) 18. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ── Failure ('tests.R:157:3'): Arguments - maxrow = ──────────────────────────── `freq(dat, maxrow = "5")` threw an error. Message: row names contain missing values Class: simpleError/error/condition Backtrace: ▆ 1. ├─testthat::expect_error(freq(dat, maxrow = "5"), NA) at tests.R:157:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─frequency::freq(dat, maxrow = "5") 7. └─frequency:::lapply_pb(...) 8. └─base::lapply(X, wrapper, ...) 9. └─frequency (local) FUN(X[[i]], ...) 10. └─frequency (local) FUN(...) 11. └─frequency:::makefreqs(x1, y, maxrow1, trim1) 12. ├─base::as.data.frame(table(x[[var]], useNA = "always"), stringsAsFactors = FALSE) 13. └─base::as.data.frame.table(...) 14. ├─base::eval(ex) 15. │ └─base::eval(ex) 16. └─base::data.frame(...) 17. ├─base::as.data.frame(x[[i]], optional = TRUE) 18. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ── Failure ('tests.R:158:3'): Arguments - maxrow = ──────────────────────────── `freq(dat, maxrow = "10")` threw an error. Message: row names contain missing values Class: simpleError/error/condition Backtrace: ▆ 1. ├─testthat::expect_error(freq(dat, maxrow = "10"), NA) at tests.R:158:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─frequency::freq(dat, maxrow = "10") 7. └─frequency:::lapply_pb(...) 8. └─base::lapply(X, wrapper, ...) 9. └─frequency (local) FUN(X[[i]], ...) 10. └─frequency (local) FUN(...) 11. └─frequency:::makefreqs(x1, y, maxrow1, trim1) 12. ├─base::as.data.frame(table(x[[var]], useNA = "always"), stringsAsFactors = FALSE) 13. └─base::as.data.frame.table(...) 14. ├─base::eval(ex) 15. │ └─base::eval(ex) 16. └─base::data.frame(...) 17. ├─base::as.data.frame(x[[i]], optional = TRUE) 18. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ── Failure ('tests.R:159:3'): Arguments - maxrow = ──────────────────────────── `freq(dat, maxrow = 5)` threw an error. Message: row names contain missing values Class: simpleError/error/condition Backtrace: ▆ 1. ├─testthat::expect_error(freq(dat, maxrow = 5), NA) at tests.R:159:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─frequency::freq(dat, maxrow = 5) 7. └─frequency:::lapply_pb(...) 8. └─base::lapply(X, wrapper, ...) 9. └─frequency (local) FUN(X[[i]], ...) 10. └─frequency (local) FUN(...) 11. └─frequency:::makefreqs(x1, y, maxrow1, trim1) 12. ├─base::as.data.frame(table(x[[var]], useNA = "always"), stringsAsFactors = FALSE) 13. └─base::as.data.frame.table(...) 14. ├─base::eval(ex) 15. │ └─base::eval(ex) 16. └─base::data.frame(...) 17. ├─base::as.data.frame(x[[i]], optional = TRUE) 18. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ── Failure ('tests.R:160:3'): Arguments - maxrow = ──────────────────────────── `freq(dat, maxrow = 10)` threw an error. Message: row names contain missing values Class: simpleError/error/condition Backtrace: ▆ 1. ├─testthat::expect_error(freq(dat, maxrow = 10), NA) at tests.R:160:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─frequency::freq(dat, maxrow = 10) 7. └─frequency:::lapply_pb(...) 8. └─base::lapply(X, wrapper, ...) 9. └─frequency (local) FUN(X[[i]], ...) 10. └─frequency (local) FUN(...) 11. └─frequency:::makefreqs(x1, y, maxrow1, trim1) 12. ├─base::as.data.frame(table(x[[var]], useNA = "always"), stringsAsFactors = FALSE) 13. └─base::as.data.frame.table(...) 14. ├─base::eval(ex) 15. │ └─base::eval(ex) 16. └─base::data.frame(...) 17. ├─base::as.data.frame(x[[i]], optional = TRUE) 18. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ── Failure ('tests.R:161:3'): Arguments - maxrow = ──────────────────────────── `freq(dat, maxrow = 100)` threw an error. Message: row names contain missing values Class: simpleError/error/condition Backtrace: ▆ 1. ├─testthat::expect_error(freq(dat, maxrow = 100), NA) at tests.R:161:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─frequency::freq(dat, maxrow = 100) 7. └─frequency:::lapply_pb(...) 8. └─base::lapply(X, wrapper, ...) 9. └─frequency (local) FUN(X[[i]], ...) 10. └─frequency (local) FUN(...) 11. └─frequency:::makefreqs(x1, y, maxrow1, trim1) 12. ├─base::as.data.frame(table(x[[var]], useNA = "always"), stringsAsFactors = FALSE) 13. └─base::as.data.frame.table(...) 14. ├─base::eval(ex) 15. │ └─base::eval(ex) 16. └─base::data.frame(...) 17. ├─base::as.data.frame(x[[i]], optional = TRUE) 18. └─base::as.data.frame.integer(x[[i]], optional = TRUE) [ FAIL 12 | WARN 0 | SKIP 2 | PASS 5 ] Error: ! Test failures. Execution halted * checking PDF version of manual ... [22s] OK * checking HTML version of manual ... [1s] OK * DONE Status: 2 ERRORs