Last updated on 2026-11-26 04:06:31 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 2.0.1 | 17.72 | 337.33 | 355.05 | OK | |
| r-devel-linux-x86_64-debian-gcc | 2.0.1 | 12.32 | 140.93 | 153.25 | ERROR | |
| r-devel-linux-x86_64-fedora-clang | 2.0.1 | 12.00 | 232.54 | 244.54 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 2.0.1 | 12.00 | 234.66 | 246.66 | OK | |
| r-devel-windows-x86_64 | 2.0.1 | 20.00 | 383.00 | 403.00 | OK | |
| r-patched-linux-x86_64 | 2.0.1 | 18.44 | 320.06 | 338.50 | OK | |
| r-release-linux-x86_64 | 2.0.1 | 16.40 | 329.36 | 345.76 | OK | |
| r-release-macos-arm64 | 2.0.1 | 4.00 | 79.00 | 83.00 | OK | |
| r-release-macos-x86_64 | 2.0.1 | 12.00 | 532.00 | 544.00 | OK | |
| r-release-windows-x86_64 | 2.0.1 | 19.00 | 377.00 | 396.00 | OK | |
| r-oldrel-macos-arm64 | 2.0.1 | 5.00 | 93.00 | 98.00 | OK | |
| r-oldrel-macos-x86_64 | 2.0.1 | 12.00 | 625.00 | 637.00 | OK | |
| r-oldrel-windows-x86_64 | 2.0.1 | 29.00 | 471.00 | 500.00 | OK |
Version: 2.0.1
Check: examples
Result: ERROR
Running examples in ‘eHDPrep-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: apply_quality_ctrl
> ### Title: Apply quality control measures to a dataset
> ### Aliases: apply_quality_ctrl
>
> ### ** Examples
>
> data(example_data)
> require(tibble)
Loading required package: tibble
>
> # create an example class_tbl object
> # note that diabetes_type is classes as ordinal and is not modified as its
> # levels are not pre-coded
> tibble::tribble(~"var", ~"datatype",
+ "patient_id", "id",
+ "tumoursize", "numeric",
+ "t_stage", "ordinal_tstage",
+ "n_stage", "ordinal_nstage",
+ "diabetes", "factor",
+ "diabetes_type", "ordinal",
+ "hypertension", "factor",
+ "rural_urban", "factor",
+ "marital_status", "factor",
+ "SNP_a", "genotype",
+ "SNP_b", "genotype",
+ "free_text", "freetext") -> data_types
>
> data_QC <- apply_quality_ctrl(example_data, patient_id, data_types,
+ bin_cats =c("No" = "Yes", "rural" = "urban"), min_freq = 0.6)
Warning: There were 4 warnings in `dplyr::mutate()`.
The first warning was:
ℹ In argument: `dplyr::across(...)`.
Caused by warning:
! 2 unknown levels in `f`: No and Yes
ℹ Run `dplyr::last_dplyr_warnings()` to see the 3 remaining warnings.
Error in `dplyr::mutate()`:
ℹ In argument: `dplyr::across(...)`.
Caused by error in `across()`:
! Can't compute column `SNP_a`.
Caused by error in `forcats::fct_infreq()`:
! `f` must be a factor or character vector, not a logical vector.
Backtrace:
▆
1. ├─eHDPrep::apply_quality_ctrl(...)
2. │ └─... %>% ...
3. ├─eHDPrep::encode_genotypes(...)
4. │ └─data %>% ...
5. ├─dplyr::mutate(., dplyr::across(c(!!!vars), encode_genotype_vec))
6. ├─dplyr:::mutate.data.frame(., dplyr::across(c(!!!vars), encode_genotype_vec))
7. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
8. │ ├─base::withCallingHandlers(...)
9. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
10. │ ├─base::withCallingHandlers(...)
11. │ └─mask$eval_all_mutate(quo)
12. │ └─dplyr (local) eval()
13. └─eHDPrep (local) `<fn>`(SNP_a)
14. ├─base::unname(forcats::fct_infreq(x, ordered = TRUE))
15. └─forcats::fct_infreq(x, ordered = TRUE)
16. └─forcats:::check_factor(f)
17. └─cli::cli_abort(...)
18. └─rlang::abort(...)
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 2.0.1
Check: tests
Result: ERROR
Running ‘testthat.R’ [20s/25s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(eHDPrep)
>
> test_check("eHDPrep")
Loading required package: dplyr
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Loading required package: magrittr
Attaching package: 'magrittr'
The following objects are masked from 'package:testthat':
equals, is_less_than, not
Saving _problems/test_dates-131.R
Saving _problems/test_dates-144.R
Saving _problems/test_high_level-72.R
Saving _problems/test_high_level-80.R
Saving _problems/test_high_level-89.R
Saving _problems/test_high_level-99.R
Saving _problems/test_high_level-113.R
Saving _problems/test_high_level-126.R
Saving _problems/test_high_level-142.R
Saving _problems/test_import_export-57.R
`y`: 1 value(s) imputed (mode).
`x`: 1 value(s) imputed (median).
[ FAIL 10 | WARN 15 | SKIP 0 | PASS 168 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test_dates.R:131:3'): apply_quality_ctrl() coerces and preserves date variables ──
Expected `as.character(res$diagnosis_date[1])` to equal "2020-01-15".
Differences:
`actual`: NA
`expected`: "2020-01-15"
── Failure ('test_dates.R:144:3'): apply_quality_ctrl() imputes date variables ──
Expected `anyNA(res$dt)` to be FALSE.
Differences:
`actual`: TRUE
`expected`: FALSE
── Error ('test_high_level.R:72:3'): apply_quality_ctrl() does not impute by default ──
Error in `tidyr::pivot_longer(., cols = dplyr::all_of(vars), values_to = ".OHE_value", names_to = ".OHE_name")`: `cols` must select at least one column.
Backtrace:
▆
1. ├─base::suppressMessages(apply_quality_ctrl(imp_data, pid, imp_ct)) at test_high_level.R:72:3
2. │ └─base::withCallingHandlers(...)
3. ├─eHDPrep::apply_quality_ctrl(imp_data, pid, imp_ct)
4. │ └─... %>% ...
5. ├─eHDPrep::encode_cats(...)
6. │ └─... %>% ...
7. ├─tidyr::pivot_wider(...)
8. ├─tidyr::pivot_longer(...)
9. └─tidyr:::pivot_longer.data.frame(., cols = dplyr::all_of(vars), values_to = ".OHE_value", names_to = ".OHE_name")
10. └─tidyr::build_longer_spec(...)
11. └─cli::cli_abort(...)
12. └─rlang::abort(...)
── Error ('test_high_level.R:79:3'): apply_quality_ctrl() imputes all eligible variables when impute = TRUE ──
Error in `tidyr::pivot_longer(., cols = dplyr::all_of(vars), values_to = ".OHE_value", names_to = ".OHE_name")`: `cols` must select at least one column.
Backtrace:
▆
1. ├─base::suppressMessages(...) at test_high_level.R:79:3
2. │ └─base::withCallingHandlers(...)
3. ├─eHDPrep::apply_quality_ctrl(imp_data, pid, imp_ct, impute = TRUE)
4. │ └─... %>% ...
5. ├─eHDPrep::encode_cats(...)
6. │ └─... %>% ...
7. ├─tidyr::pivot_wider(...)
8. ├─tidyr::pivot_longer(...)
9. └─tidyr:::pivot_longer.data.frame(., cols = dplyr::all_of(vars), values_to = ".OHE_value", names_to = ".OHE_name")
10. └─tidyr::build_longer_spec(...)
11. └─cli::cli_abort(...)
12. └─rlang::abort(...)
── Error ('test_high_level.R:88:3'): apply_quality_ctrl() imputes after numeric coercion ──
Error in `tidyr::pivot_longer(., cols = dplyr::all_of(vars), values_to = ".OHE_value", names_to = ".OHE_name")`: `cols` must select at least one column.
Backtrace:
▆
1. ├─base::suppressMessages(...) at test_high_level.R:88:3
2. │ └─base::withCallingHandlers(...)
3. ├─eHDPrep::apply_quality_ctrl(imp_data, pid, imp_ct, impute = TRUE)
4. │ └─... %>% ...
5. ├─eHDPrep::encode_cats(...)
6. │ └─... %>% ...
7. ├─tidyr::pivot_wider(...)
8. ├─tidyr::pivot_longer(...)
9. └─tidyr:::pivot_longer.data.frame(., cols = dplyr::all_of(vars), values_to = ".OHE_value", names_to = ".OHE_name")
10. └─tidyr::build_longer_spec(...)
11. └─cli::cli_abort(...)
12. └─rlang::abort(...)
── Error ('test_high_level.R:98:3'): apply_quality_ctrl() imputes after missing values are encoded ──
Error in `tidyr::pivot_longer(., cols = dplyr::all_of(vars), values_to = ".OHE_value", names_to = ".OHE_name")`: `cols` must select at least one column.
Backtrace:
▆
1. ├─base::suppressMessages(...) at test_high_level.R:98:3
2. │ └─base::withCallingHandlers(...)
3. ├─eHDPrep::apply_quality_ctrl(imp_data, pid, imp_ct, impute = TRUE)
4. │ └─... %>% ...
5. ├─eHDPrep::encode_cats(...)
6. │ └─... %>% ...
7. ├─tidyr::pivot_wider(...)
8. ├─tidyr::pivot_longer(...)
9. └─tidyr:::pivot_longer.data.frame(., cols = dplyr::all_of(vars), values_to = ".OHE_value", names_to = ".OHE_name")
10. └─tidyr::build_longer_spec(...)
11. └─cli::cli_abort(...)
12. └─rlang::abort(...)
── Error ('test_high_level.R:111:3'): apply_quality_ctrl() forwards impute_method ──
Error in `tidyr::pivot_longer(., cols = dplyr::all_of(vars), values_to = ".OHE_value", names_to = ".OHE_name")`: `cols` must select at least one column.
Backtrace:
▆
1. ├─base::suppressMessages(...) at test_high_level.R:111:3
2. │ └─base::withCallingHandlers(...)
3. ├─eHDPrep::apply_quality_ctrl(...)
4. │ └─... %>% ...
5. ├─eHDPrep::encode_cats(...)
6. │ └─... %>% ...
7. ├─tidyr::pivot_wider(...)
8. ├─tidyr::pivot_longer(...)
9. └─tidyr:::pivot_longer.data.frame(., cols = dplyr::all_of(vars), values_to = ".OHE_value", names_to = ".OHE_name")
10. └─tidyr::build_longer_spec(...)
11. └─cli::cli_abort(...)
12. └─rlang::abort(...)
── Error ('test_high_level.R:124:3'): apply_quality_ctrl() falls back to the mode for non-numeric variables ──
Error in `tidyr::pivot_longer(., cols = dplyr::all_of(vars), values_to = ".OHE_value", names_to = ".OHE_name")`: `cols` must select at least one column.
Backtrace:
▆
1. ├─testthat::capture_messages(...) at test_high_level.R:124:3
2. │ └─base::withCallingHandlers(...)
3. ├─eHDPrep::apply_quality_ctrl(...)
4. │ └─... %>% ...
5. ├─eHDPrep::encode_cats(...)
6. │ └─... %>% ...
7. ├─tidyr::pivot_wider(...)
8. ├─tidyr::pivot_longer(...)
9. └─tidyr:::pivot_longer.data.frame(., cols = dplyr::all_of(vars), values_to = ".OHE_value", names_to = ".OHE_name")
10. └─tidyr::build_longer_spec(...)
11. └─cli::cli_abort(...)
12. └─rlang::abort(...)
── Error ('test_high_level.R:140:3'): apply_quality_ctrl() supports knn imputation ──
<subscriptOutOfBoundsError/error/condition>
Error in `indexNA2s[, variable[j]]`: subscript out of bounds
Backtrace:
▆
1. ├─base::suppressMessages(...) at test_high_level.R:140:3
2. │ └─base::withCallingHandlers(...)
3. ├─eHDPrep::apply_quality_ctrl(...)
4. │ └─... %>% ...
5. └─eHDPrep::impute_missing_values(...)
6. └─eHDPrep:::impute_knn(data, selected, k = k, ignore = rlang::enquo(ignore))
7. └─VIM::kNN(...)
── Error ('test_import_export.R:54:3'): the documented class_tbl workflow runs end to end ──
<dplyr:::mutate_error/rlang_error/error/condition>
Error in `dplyr::mutate(., dplyr::across(c(!!!vars), encode_genotype_vec))`: i In argument: `dplyr::across(...)`.
Caused by error in `across()`:
! Can't compute column `SNP_a`.
Caused by error in `forcats::fct_infreq()`:
! `f` must be a factor or character vector, not a logical vector.
Backtrace:
▆
1. ├─base::suppressWarnings(...) at test_import_export.R:54:3
2. │ └─base::withCallingHandlers(...)
3. ├─base::suppressMessages(...)
4. │ └─base::withCallingHandlers(...)
5. ├─eHDPrep::apply_quality_ctrl(...)
6. │ └─... %>% ...
7. ├─eHDPrep::encode_genotypes(...)
8. │ └─data %>% ...
9. ├─dplyr::mutate(., dplyr::across(c(!!!vars), encode_genotype_vec))
10. ├─dplyr:::mutate.data.frame(., dplyr::across(c(!!!vars), encode_genotype_vec))
11. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
12. │ ├─base::withCallingHandlers(...)
13. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
14. │ ├─base::withCallingHandlers(...)
15. │ └─mask$eval_all_mutate(quo)
16. │ └─dplyr (local) eval()
17. ├─eHDPrep (local) `<fn>`(SNP_a)
18. │ ├─base::unname(forcats::fct_infreq(x, ordered = TRUE))
19. │ └─forcats::fct_infreq(x, ordered = TRUE)
20. │ └─forcats:::check_factor(f)
21. │ └─cli::cli_abort(...)
22. │ └─rlang::abort(...)
23. │ └─rlang:::signal_abort(cnd, .file)
24. │ └─base::signalCondition(cnd)
25. ├─dplyr (local) `<fn>`(`<rlng_rrr>`)
26. │ └─rlang::abort(msg, call = call("across"), parent = cnd)
27. │ └─rlang:::signal_abort(cnd, .file)
28. │ └─base::signalCondition(cnd)
29. └─dplyr (local) `<fn>`(`<rlng_rrr>`)
30. └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
[ FAIL 10 | WARN 15 | SKIP 0 | PASS 168 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 2.0.1
Check: re-building of vignette outputs
Result: ERROR
Error(s) in re-building vignettes:
...
--- re-building ‘Introduction_to_eHDPrep.Rmd’ using rmarkdown
Quitting from Introduction_to_eHDPrep.Rmd:263-271 [unnamed-chunk-15]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/dplyr:::mutate_error>
Error in `dplyr::mutate()`:
i In argument: `dplyr::across(...)`.
Caused by error in `across()`:
! Can't compute column `SNP_a`.
---
Backtrace:
x
1. +-eHDPrep::apply_quality_ctrl(...)
2. | \-... %>% ...
3. +-eHDPrep::encode_genotypes(...)
4. | \-data %>% ...
5. +-dplyr::mutate(., dplyr::across(c(!!!vars), encode_genotype_vec))
6. +-dplyr:::mutate.data.frame(., dplyr::across(c(!!!vars), encode_genotype_vec))
7. | \-dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
8. | +-base::withCallingHandlers(...)
9. | \-dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
10. | +-base::withCallingHandlers(...)
11. | \-mask$eval_all_mutate(quo)
12. | \-dplyr (local) eval()
13. +-eHDPrep (local) `<fn>`(SNP_a)
14. | +-base::unname(forcats::fct_infreq(x, ordered = TRUE))
15. | \-forcats::fct_infreq(x, ordered = TRUE)
16. | \-forcats:::check_factor(f)
17. | \-cli::cli_abort(...)
18. | \-rlang::abort(...)
19. | \-rlang:::signal_abort(cnd, .file)
20. | \-base::signalCondition(cnd)
21. \-dplyr (local) `<fn>`(`<rlng_rrr>`)
Caused by error in `forcats::fct_infreq()`:
! `f` must be a factor or character vector, not a logical vector.
---
Backtrace:
x
1. +-eHDPrep::apply_quality_ctrl(...)
2. | \-... %>% ...
3. +-eHDPrep::encode_genotypes(...)
4. | \-data %>% ...
5. +-dplyr::mutate(., dplyr::across(c(!!!vars), encode_genotype_vec))
6. +-dplyr:::mutate.data.frame(., dplyr::across(c(!!!vars), encode_genotype_vec))
7. | \-dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
8. | +-base::withCallingHandlers(...)
9. | \-dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
10. | +-base::withCallingHandlers(...)
11. | \-mask$eval_all_mutate(quo)
12. | \-dplyr (local) eval()
13. \-eHDPrep (local) `<fn>`(SNP_a)
14. +-base::unname(forcats::fct_infreq(x, ordered = TRUE))
15. \-forcats::fct_infreq(x, ordered = TRUE)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'Introduction_to_eHDPrep.Rmd' failed with diagnostics:
ℹ In argument: `dplyr::across(...)`.
Caused by error in `across()`:
! Can't compute column `SNP_a`.
Caused by error in `forcats::fct_infreq()`:
! `f` must be a factor or character vector, not a logical vector.
--- failed re-building ‘Introduction_to_eHDPrep.Rmd’
SUMMARY: processing the following file failed:
‘Introduction_to_eHDPrep.Rmd’
Error: Vignette re-building failed.
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc