* using log directory 'd:/Rcompile/CRANpkg/local/4.3/visOmopResults.Rcheck' * using R version 4.3.3 (2024-02-29 ucrt) * using platform: x86_64-w64-mingw32 (64-bit) * R was compiled by gcc.exe (GCC) 12.3.0 GNU Fortran (GCC) 12.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'visOmopResults/DESCRIPTION' ... OK * this is package 'visOmopResults' version '0.2.1' * 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 hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'visOmopResults' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' 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 R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [1s] OK * checking whether the package can be loaded with stated dependencies ... [1s] OK * checking whether the package can be unloaded cleanly ... [1s] OK * checking whether the namespace can be loaded with stated dependencies ... [1s] OK * checking whether the namespace can be unloaded cleanly ... [1s] OK * checking loading without being on the library search path ... [1s] 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 ... [8s] OK * checking Rd files ... [1s] 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 installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [7s] ERROR Running examples in 'visOmopResults-Ex.R' failed The error most likely occurred in: > ### Name: formatTable > ### Title: Format a summarised_result object into a gt, flextable or tibble > ### object > ### Aliases: formatTable > > ### ** Examples > > mockSummarisedResult() |> formatTable( + formatEstimateName = c("N%" = " ()", + "N" = "", + "Mean (SD)" = " ()"), + header = c("group"), + split = c("group","strata", "additional") + ) ! The following variables: result_type, package_name, package_version; were added to `settings` Error in `dplyr::select()`: ℹ In argument: `dplyr::all_of(excludeColumns)`. Caused by error in `dplyr::all_of()`: ! Can't subset elements that don't exist. ✖ Elements `result_type`, `package_name`, and `package_version` don't exist. Backtrace: ▆ 1. ├─visOmopResults::formatTable(...) 2. │ ├─dplyr::rename_with(...) 3. │ ├─dplyr::select(...) 4. │ └─dplyr:::select.data.frame(...) 5. │ └─tidyselect::eval_select(expr(c(...)), data = .data, error_call = error_call) 6. │ └─tidyselect:::eval_select_impl(...) 7. │ ├─tidyselect:::with_subscript_errors(...) 8. │ │ └─base::withCallingHandlers(...) 9. │ └─tidyselect:::vars_select_eval(...) 10. │ └─tidyselect:::walk_data_tree(expr, data_mask, context_mask) 11. │ └─tidyselect:::eval_c(expr, data_mask, context_mask) 12. │ └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init) 13. │ └─tidyselect:::walk_data_tree(new, data_mask, context_mask) 14. │ └─tidyselect:::eval_bang(expr, data_mask, context_mask) 15. │ └─tidyselect:::walk_data_tree(expr[[2]], data_mask, context_mask) 16. │ └─tidyselect:::eval_context(expr, context_mask, call = error_call) 17. │ ├─tidyselect:::with_chained_errors(...) 18. │ │ └─base::withCallingHandlers(...) 19. │ └─rlang::eval_tidy(as_quosure(expr, env), context_mask) 20. ├─dplyr::all_of(excludeColumns) 21. │ └─tidyselect:::as_indices_impl(x, vars = vars, strict = TRUE) 22. │ └─tidyselect:::chr_as_locations(x, vars, call = call, arg = arg) 23. │ └─vctrs::vec_as_location(...) 24. └─vctrs (local) ``() 25. └─vctrs:::stop_subscript_oob(...) 26. └─vctrs:::stop_subscript(...) 27. └─rlang::abort(...) Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [28s] ERROR Running 'testthat.R' [28s] Running the tests in 'tests/testthat.R' failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(visOmopResults) > > test_check("visOmopResults") Starting 2 test processes [ FAIL 20 | WARN 5 | SKIP 0 | PASS 255 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-appendSettings.R:34:3'): appendSettings ──────────────────────── Error in `dplyr::union_all(result, dplyr::mutate(result, result_id = as.integer(2), package_name = "testing"))`: `x` and `y` are not compatible. x Different number of columns: 15 vs 16. Backtrace: ▆ 1. ├─dplyr::union_all(...) at test-appendSettings.R:34:3 2. └─dplyr:::union_all.data.frame(result, dplyr::mutate(result, result_id = as.integer(2), package_name = "testing")) 3. └─dplyr:::check_compatible(x, y) 4. └─rlang::abort(c("`x` and `y` are not compatible.", compat), call = error_call) ── Error ('test-formatEstimateValue.R:209:5'): formatEstimateValue ───────────── Error in `dplyr::union_all(mockSummarisedResult(), dplyr::tibble(result_id = as.integer(1), cdm_name = "mock", result_type = NA_character_, package_name = "visOmopResults", package_version = as.character(utils::packageVersion("visOmopResults")), group_name = "cohort_name", group_level = "cohort3", strata_name = rep(c("overall", rep("age_group &&& sex", 4), rep("sex", 2), rep("age_group", 2)), 2), strata_level = rep(c("overall", "<40 &&& Male", ">=40 &&& Male", "<40 &&& Female", ">=40 &&& Female", "Male", "Female", "<40", ">=40"), 2), variable_name = "number subjects", variable_level = NA_character_, estimate_name = "count", estimate_type = "integer", estimate_value = NA_character_, additional_name = "overall", additional_level = "overall"))`: `x` and `y` are not compatible. x Different number of columns: 13 vs 16. Backtrace: ▆ 1. ├─dplyr::union_all(...) at test-formatEstimateValue.R:209:5 2. └─dplyr:::union_all.data.frame(...) 3. └─dplyr:::check_compatible(x, y) 4. └─rlang::abort(c("`x` and `y` are not compatible.", compat), call = error_call) ── Failure ('test-formatTable.R:4:3'): formatTable ───────────────────────────── Expected `... <- NULL` to run without any errors. i Actually got a with text: i In argument: `dplyr::all_of(excludeColumns)`. Caused by error in `dplyr::all_of()`: ! Can't subset elements that don't exist. x Elements `result_type`, `package_name`, and `package_version` don't exist. ── Error ('test-formatTable.R:17:3'): formatTable ────────────────────────────── Error in `eval(code, test_env)`: object 'gt1' not found Backtrace: ▆ 1. ├─testthat::expect_true("gt_tbl" %in% class(gt1)) at test-formatTable.R:17:3 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─"gt_tbl" %in% class(gt1) ── Failure ('test-fxTable.R:45:3'): fxTable ──────────────────────────────────── unique(fxResult$body$dataset$result_type) (`actual`) not equal to "mock_summarised_result" (`expected`). `actual` is NULL `expected` is a character vector ('mock_summarised_result') ── Error ('test-fxTable.R:56:3'): fxTable ────────────────────────────────────── Error in `fxResult$body$styles$pars$text.align$data[1, 12:29]`: subscript out of bounds Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-fxTable.R:56:3 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─base::unique(fxResult$body$styles$pars$text.align$data[1, 12:29]) ── Failure ('test-fxTable.R:284:3'): fxTable, test colsToMergeRows ───────────── fxResult$body$styles$cells$border.color.top$data[, 7] (`actual`) not equal to c(...) (`expected`). actual | expected [1] "gray" | "gray" [1] [2] "gray" | "gray" [2] [3] "gray" | "gray" [3] [4] "gray" - "black" [4] [5] "gray" | "gray" [5] [6] "gray" - "black" [6] [7] "gray" - "black" [7] [8] "gray" - "black" [8] [9] "gray" | "gray" [9] [10] "gray" | "gray" [10] ... ... ... and 6 more ... ── Failure ('test-fxTable.R:287:3'): fxTable, test colsToMergeRows ───────────── fxResult$body$styles$cells$border.color.top$data[, 8] (`actual`) not equal to c(...) (`expected`). actual | expected [1] "gray" | "gray" [1] [2] "gray" | "gray" [2] [3] "gray" | "gray" [3] [4] "gray" - "black" [4] [5] "gray" | "gray" [5] [6] "gray" - "black" [6] [7] "gray" | "gray" [7] [8] "gray" - "black" [8] [9] "gray" | "gray" [9] [10] "gray" | "gray" [10] ... ... ... and 6 more ... ── Error ('test-fxTable.R:290:3'): fxTable, test colsToMergeRows ─────────────── Error in `fxResult$body$styles$cells$border.color.top$data[, 19]`: subscript out of bounds Backtrace: ▆ 1. └─testthat::expect_equal(...) at test-fxTable.R:290:3 2. └─testthat::quasi_label(enquo(object), label, arg = "object") 3. └─rlang::eval_bare(expr, quo_get_env(quo)) ── Failure ('test-gtTable.R:57:3'): gtTable ──────────────────────────────────── ... == "bold" is not TRUE `actual`: TRUE `expected`: TRUE ── Failure ('test-gtTable.R:111:3'): gtTable ─────────────────────────────────── ... == 11 is not TRUE `actual`: FALSE `expected`: TRUE ── Failure ('test-gtTable.R:193:3'): gtTable, test default styles and NULL ───── gtResult$`_styles`$styles[203][[1]]$cell_text$align == "left" is not TRUE `actual`: `expected`: TRUE ── Failure ('test-gtTable.R:232:3'): gtTable, test default styles and NULL ───── unique(...) (`actual`) not equal to c("center", "bold") (`expected`). `actual`: "center" "bold" NA `expected`: "center" "bold" ── Failure ('test-gtTable.R:276:3'): gtTable, test colsToMergeRows ───────────── gtResult$`_data`$result_type (`actual`) not equal to c(...) (`expected`). `actual` is NULL `expected` is a character vector ('mock_summarised_result', '', '', '', '', ...) ── Failure ('test-gtTable.R:299:3'): gtTable, test colsToMergeRows ───────────── gtResult$`_data`$result_type (`actual`) not equal to rep("mock_summarised_result", 14) (`expected`). `actual` is NULL `expected` is a character vector ('mock_summarised_result', 'mock_summarised_result', 'mock_summarised_result', 'mock_summarised_result', 'mock_summarised_result', ...) ── Failure ('test-gtTable.R:322:3'): gtTable, test colsToMergeRows ───────────── gtResult$`_data`$result_type (`actual`) not equal to c(...) (`expected`). `actual` is NULL `expected` is a character vector ('mock_summarised_result', '', '', '', '', ...) ── Error ('test-pivotSettings.R:2:3'): pivotSettings ─────────────────────────── Error in `dplyr::union_all(mockSummarisedResult()[1, ], dplyr::tibble(result_id = as.integer(1), cdm_name = "mock", result_type = "mock_summarised_result", package_name = "visOmopResults", package_version = as.character(utils::packageVersion("visOmopResults")), group_name = "overall", group_level = "overall", strata_name = "overall", strata_level = "overall", variable_name = "settings", variable_level = NA_character_, estimate_name = "mock_default", estimate_type = "logical", estimate_value = "TRUE", additional_name = "overall", additional_level = "overall"))`: `x` and `y` are not compatible. x Different number of columns: 13 vs 16. Backtrace: ▆ 1. ├─dplyr::union_all(...) at test-pivotSettings.R:2:3 2. └─dplyr:::union_all.data.frame(...) 3. └─dplyr:::check_compatible(x, y) 4. └─rlang::abort(c("`x` and `y` are not compatible.", compat), call = error_call) ── Error ('test-tidy.R:2:3'): tidy ───────────────────────────────────────────── Error in `dplyr::union_all(mockSummarisedResult(), dplyr::tibble(result_id = as.integer(1), cdm_name = "mock", result_type = "mock_summarised_result", package_name = "visOmopResults", package_version = as.character(utils::packageVersion("visOmopResults")), group_name = "overall", group_level = "overall", strata_name = "overall", strata_level = "overall", variable_name = "settings", variable_level = NA_character_, estimate_name = "mock_default", estimate_type = "logical", estimate_value = "TRUE", additional_name = "overall", additional_level = "overall"))`: `x` and `y` are not compatible. x Different number of columns: 13 vs 16. Backtrace: ▆ 1. ├─dplyr::union_all(...) at test-tidy.R:2:3 2. └─dplyr:::union_all.data.frame(...) 3. └─dplyr:::check_compatible(x, y) 4. └─rlang::abort(c("`x` and `y` are not compatible.", compat), call = error_call) ── Failure ('test-tidy.R:118:3'): tidy, dates ────────────────────────────────── Expected `result_out <- tidy(result)` to run without any errors. i Actually got a with text: Join columns in `x` must be present in the data. x Problem with `result_type`. ── Error ('test-tidy.R:119:3'): tidy, dates ──────────────────────────────────── Error in `eval(code, test_env)`: object 'result_out' not found Backtrace: ▆ 1. ├─testthat::expect_true(...) at test-tidy.R:119:3 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::as.Date(dplyr::pull(result_out, date)) 5. └─dplyr::pull(result_out, date) [ FAIL 20 | WARN 5 | SKIP 0 | PASS 255 ] Error: Test failures Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking re-building of vignette outputs ... [12s] ERROR Error(s) in re-building vignettes: --- re-building 'formatFunctions.Rmd' using rmarkdown Quitting from lines at lines 121-128 [unnamed-chunk-6] (formatFunctions.Rmd) Error: processing vignette 'formatFunctions.Rmd' failed with diagnostics: ℹ In argument: `all_of(...)`. Caused by error in `all_of()`: ! Can't subset elements that don't exist. ✖ Elements `result_type`, `package_name`, and `package_version` don't exist. --- failed re-building 'formatFunctions.Rmd' --- re-building 'splitAndUnite.Rmd' using rmarkdown --- finished re-building 'splitAndUnite.Rmd' --- re-building 'tidy.Rmd' using rmarkdown Quitting from lines at lines 55-58 [unnamed-chunk-5] (tidy.Rmd) Error: processing vignette 'tidy.Rmd' failed with diagnostics: Join columns in `x` must be present in the data. ✖ Problem with `result_type`. --- failed re-building 'tidy.Rmd' SUMMARY: processing the following files failed: 'formatFunctions.Rmd' 'tidy.Rmd' Error: Vignette re-building failed. Execution halted * checking PDF version of manual ... [17s] OK * checking HTML version of manual ... [4s] OK * DONE Status: 3 ERRORs