Last updated on 2024-11-23 09:49:50 CET.
Package | ERROR | OK |
---|---|---|
visOmopResults | 2 | 11 |
Current CRAN status: ERROR: 2, OK: 11
Version: 0.4.0
Check: examples
Result: ERROR
Running examples in ‘visOmopResults-Ex.R’ failed
The error most likely occurred in:
> ### Name: filterSettings
> ### Title: Filter a <summarised_result> using the settings
> ### Aliases: filterSettings
>
> ### ** Examples
>
> library(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
> library(omopgenerics)
Attaching package: ‘omopgenerics’
The following objects are masked from ‘package:visOmopResults’:
addSettings, additionalColumns, filterAdditional, filterGroup,
filterSettings, filterStrata, groupColumns, pivotEstimates,
settingsColumns, splitAdditional, splitAll, splitGroup,
splitStrata, strataColumns, tidyColumns, uniteAdditional,
uniteGroup, uniteStrata
The following object is masked from ‘package:stats’:
filter
>
> x <- tibble(
+ "result_id" = as.integer(c(1, 2)),
+ "cdm_name" = c("cprd", "eunomia"),
+ "group_name" = "sex",
+ "group_level" = "male",
+ "strata_name" = "sex",
+ "strata_level" = "male",
+ "variable_name" = "Age group",
+ "variable_level" = "10 to 50",
+ "estimate_name" = "count",
+ "estimate_type" = "numeric",
+ "estimate_value" = "5",
+ "additional_name" = "overall",
+ "additional_level" = "overall"
+ ) |>
+ newSummarisedResult(settings = tibble(
+ "result_id" = c(1, 2), "custom" = c("A", "B")
+ ))
`result_type`, `package_name`, and `package_version` added to settings.
Error in `newSummarisedResult()`:
! In result_id = 1: `sex` present in both group and strata.
In result_id = 2: `sex` present in both group and strata.
Backtrace:
▆
1. └─omopgenerics::newSummarisedResult(...)
2. └─omopgenerics:::validateSummarisedResult(x)
3. └─omopgenerics:::validateResultSettings(attr(x, "settings"), call = call)
4. └─omopgenerics:::reportOverlap(...)
5. └─cli::cli_abort(message = message, call = call)
6. └─rlang::abort(...)
Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Version: 0.4.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [147s/92s]
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)
Registered S3 method overwritten by 'visOmopResults':
method from
tidy.summarised_result omopgenerics
>
> test_check("visOmopResults")
Starting 2 test processes
[ FAIL 14 | WARN 49 | SKIP 0 | PASS 476 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-addSettings.R:17:3'): addSettings ────────────────────────────
Expected `... <- NULL` to run without any errors.
i Actually got a <rlang_error> with text:
In result_id = 1: `sex` present in both group and strata.
In result_id = 2: `sex` present in both group and strata.
── Error ('test-addSettings.R:27:3'): addSettings ──────────────────────────────
Error in `eval(code, test_env)`: object 'res' not found
Backtrace:
▆
1. ├─testthat::expect_identical(...) at test-addSettings.R:27:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::sort(colnames(settings(res)))
5. ├─base::colnames(settings(res))
6. │ └─base::is.data.frame(x)
7. └─omopgenerics::settings(res)
── Failure ('test-filter.R:35:3'): filterSettings ──────────────────────────────
Expected `... <- NULL` to run without any errors.
i Actually got a <rlang_error> with text:
In result_id = 1: `sex` present in both group and strata.
In result_id = 2: `sex` present in both group and strata.
── Error ('test-filter.R:45:3'): filterSettings ────────────────────────────────
Error in `eval(code, test_env)`: object 'res' not found
Backtrace:
▆
1. └─visOmopResults::filterSettings(res, package_name == "omock") at test-filter.R:45:3
2. └─visOmopResults:::validateSettingsAttribute(result)
── Failure ('test-tidy.R:37:3'): tidySummarisedResult ──────────────────────────
all(...) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-visOmopTable.R:3:3'): visOmopTable ───────────────────────────
`expect_no_error(...)` did not throw the expected message.
── Failure ('test-visOmopTable.R:20:3'): visOmopTable ──────────────────────────
`expect_no_error(...)` did not throw the expected message.
── Failure ('test-visOmopTable.R:46:3'): visOmopTable ──────────────────────────
`expect_no_error(...)` did not throw the expected message.
── Failure ('test-visOmopTable.R:65:3'): visOmopTable ──────────────────────────
`expect_no_error(...)` did not throw the expected message.
── Failure ('test-visOmopTable.R:86:3'): visOmopTable ──────────────────────────
`expect_no_error(...)` did not throw the expected message.
── Failure ('test-visOmopTable.R:132:3'): visOmopTable ─────────────────────────
all(...) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-visOmopTable.R:136:3'): visOmopTable ─────────────────────────
all(...) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-visOmopTable.R:153:3'): renameColumn works ───────────────────
`expect_no_error(...)` did not throw the expected message.
── Failure ('test-visOmopTable.R:186:3'): renameColumn works ───────────────────
`expect_warning(...)` did not throw the expected message.
[ FAIL 14 | WARN 49 | SKIP 0 | PASS 476 ]
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 0.4.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [137s/84s]
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)
Registered S3 method overwritten by 'visOmopResults':
method from
tidy.summarised_result omopgenerics
>
> test_check("visOmopResults")
Starting 2 test processes
[ FAIL 14 | WARN 49 | SKIP 0 | PASS 476 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-addSettings.R:17:3'): addSettings ────────────────────────────
Expected `... <- NULL` to run without any errors.
i Actually got a <rlang_error> with text:
In result_id = 1: `sex` present in both group and strata.
In result_id = 2: `sex` present in both group and strata.
── Error ('test-addSettings.R:27:3'): addSettings ──────────────────────────────
Error in `eval(code, test_env)`: object 'res' not found
Backtrace:
▆
1. ├─testthat::expect_identical(...) at test-addSettings.R:27:3
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─base::sort(colnames(settings(res)))
5. ├─base::colnames(settings(res))
6. │ └─base::is.data.frame(x)
7. └─omopgenerics::settings(res)
── Failure ('test-filter.R:35:3'): filterSettings ──────────────────────────────
Expected `... <- NULL` to run without any errors.
i Actually got a <rlang_error> with text:
In result_id = 1: `sex` present in both group and strata.
In result_id = 2: `sex` present in both group and strata.
── Error ('test-filter.R:45:3'): filterSettings ────────────────────────────────
Error in `eval(code, test_env)`: object 'res' not found
Backtrace:
▆
1. └─visOmopResults::filterSettings(res, package_name == "omock") at test-filter.R:45:3
2. └─visOmopResults:::validateSettingsAttribute(result)
── Failure ('test-tidy.R:37:3'): tidySummarisedResult ──────────────────────────
all(...) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-visOmopTable.R:3:3'): visOmopTable ───────────────────────────
`expect_no_error(...)` did not throw the expected message.
── Failure ('test-visOmopTable.R:20:3'): visOmopTable ──────────────────────────
`expect_no_error(...)` did not throw the expected message.
── Failure ('test-visOmopTable.R:46:3'): visOmopTable ──────────────────────────
`expect_no_error(...)` did not throw the expected message.
── Failure ('test-visOmopTable.R:65:3'): visOmopTable ──────────────────────────
`expect_no_error(...)` did not throw the expected message.
── Failure ('test-visOmopTable.R:86:3'): visOmopTable ──────────────────────────
`expect_no_error(...)` did not throw the expected message.
── Failure ('test-visOmopTable.R:132:3'): visOmopTable ─────────────────────────
all(...) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-visOmopTable.R:136:3'): visOmopTable ─────────────────────────
all(...) is not TRUE
`actual`: FALSE
`expected`: TRUE
── Failure ('test-visOmopTable.R:153:3'): renameColumn works ───────────────────
`expect_no_error(...)` did not throw the expected message.
── Failure ('test-visOmopTable.R:186:3'): renameColumn works ───────────────────
`expect_warning(...)` did not throw the expected message.
[ FAIL 14 | WARN 49 | SKIP 0 | PASS 476 ]
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc