CRAN Package Check Results for Package cleanEHR

Last updated on 2020-02-19 10:48:48 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.0 26.93 114.81 141.74 ERROR
r-devel-linux-x86_64-debian-gcc 1.0 21.38 83.51 104.89 ERROR
r-devel-linux-x86_64-fedora-clang 1.0 165.61 ERROR
r-devel-linux-x86_64-fedora-gcc 1.0 158.35 ERROR
r-devel-windows-ix86+x86_64 1.0 49.00 136.00 185.00 OK
r-devel-windows-ix86+x86_64-gcc8 1.0 63.00 202.00 265.00 OK
r-patched-linux-x86_64 1.0 25.63 95.09 120.72 OK
r-patched-solaris-x86 1.0 190.40 OK
r-release-linux-x86_64 1.0 22.52 94.56 117.08 OK
r-release-windows-ix86+x86_64 1.0 60.00 135.00 195.00 OK
r-release-osx-x86_64 1.0 OK
r-oldrel-windows-ix86+x86_64 1.0 50.00 132.00 182.00 OK
r-oldrel-osx-x86_64 1.0 OK

Check Details

Version: 1.0
Check: tests
Result: ERROR
     Running 'testthat.R' [15s/13s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(cleanEHR)
     >
     >
     > test_check("cleanEHR")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     cleanEHR
     --- call from context ---
     icnarc.breakdown(c("1", "1.2.3.4"))
     --- call from argument ---
     if (class(cols) == "numeric") return(combine(cols)) else return(apply(cols,
     1, combine))
     --- R stacktrace ---
     where 1: icnarc.breakdown(c("1", "1.2.3.4"))
     where 2: eval_bare(expr, quo_get_env(quo))
     where 3: quasi_label(enquo(object), label, arg = "object")
     where 4 at testthat/test_utilities.r#14: expect_equivalent(icnarc.breakdown(c("1", "1.2.3.4")), c("1",
     "1.2.3"))
     where 5: eval(code, test_env)
     where 6: eval(code, test_env)
     where 7: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 11: doTryCatch(return(expr), name, parentenv, handler)
     where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 13: tryCatchList(expr, classes, parentenv, handlers)
     where 14: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 15: test_code(desc, code, env = parent.frame())
     where 16 at testthat/test_utilities.r#3: test_that("break down ICNARC code", {
     expect_equivalent(icnarc.breakdown("1.2.3.4.5"), "1.2.3")
     expect_equivalent(icnarc.breakdown("1.2.3.4.5", 4), "1.2.3.4")
     expect_equivalent(icnarc.breakdown("10.2.3.4.5"), "10.2.3")
     expect_equivalent(icnarc.breakdown("01.2.3.4.5"), "1.2.3")
     expect_equivalent(icnarc.breakdown("1.2.3"), "1.2.3")
     expect_equivalent(icnarc.breakdown("1.2"), "1.2")
     expect_equivalent(icnarc.breakdown("1"), "1")
     expect_equivalent(icnarc.breakdown(c("1", "1.2.3.4")), c("1",
     "1.2.3"))
     })
     where 17: eval(code, test_env)
     where 18: eval(code, test_env)
     where 19: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 23: doTryCatch(return(expr), name, parentenv, handler)
     where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 25: tryCatchList(expr, classes, parentenv, handlers)
     where 26: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 27: test_code(NULL, exprs, env)
     where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 29: force(code)
     where 30: doWithOneRestart(return(expr), restart)
     where 31: withOneRestart(expr, restarts[[1L]])
     where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 33: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 34: FUN(X[[i]], ...)
     where 35: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 36: force(code)
     where 37: doWithOneRestart(return(expr), restart)
     where 38: withOneRestart(expr, restarts[[1L]])
     where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 40: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 42: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 43: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 44: test_check("cleanEHR")
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (r, digits = 3)
     {
     cols <- strsplit(r, "[.]")
     cols <- lapply(cols, function(x) {
     x <- tryCatch(as.numeric(x), warning = function(w) {
     return(NA)
     })
     if (length(x) < 5)
     x <- c(x, rep(NA, 5 - length(x)))
     if (length(x) > 5)
     x <- x[1:5]
     x
     })
     cols <- t(data.frame(cols))
     rownames(cols) <- seq(nrow(cols))
     cols <- cols[, 1:digits]
     combine <- function(x) {
     x <- x[!is.na(x)]
     paste(x, collapse = ".")
     }
     if (digits == 1)
     return(as.character(cols))
     if (class(cols) == "numeric")
     return(combine(cols))
     else return(apply(cols, 1, combine))
     }
     <bytecode: 0x14ce700>
     <environment: namespace:cleanEHR>
     --- function search by body ---
     Function icnarc.breakdown in namespace cleanEHR has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 1. Error: break down ICNARC code (@test_utilities.r#14) --------------------
     the condition has length > 1
     Backtrace:
     1. testthat::expect_equivalent(...)
     4. cleanEHR:::icnarc.breakdown(c("1", "1.2.3.4"))
    
     == testthat results ===========================================================
     [ OK: 229 | SKIPPED: 15 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: break down ICNARC code (@test_utilities.r#14)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.0
Check: tests
Result: ERROR
     Running ‘testthat.R’ [10s/14s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(cleanEHR)
     >
     >
     > test_check("cleanEHR")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     cleanEHR
     --- call from context ---
     icnarc.breakdown(c("1", "1.2.3.4"))
     --- call from argument ---
     if (class(cols) == "numeric") return(combine(cols)) else return(apply(cols,
     1, combine))
     --- R stacktrace ---
     where 1: icnarc.breakdown(c("1", "1.2.3.4"))
     where 2: eval_bare(expr, quo_get_env(quo))
     where 3: quasi_label(enquo(object), label, arg = "object")
     where 4 at testthat/test_utilities.r#14: expect_equivalent(icnarc.breakdown(c("1", "1.2.3.4")), c("1",
     "1.2.3"))
     where 5: eval(code, test_env)
     where 6: eval(code, test_env)
     where 7: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 11: doTryCatch(return(expr), name, parentenv, handler)
     where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 13: tryCatchList(expr, classes, parentenv, handlers)
     where 14: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 15: test_code(desc, code, env = parent.frame())
     where 16 at testthat/test_utilities.r#3: test_that("break down ICNARC code", {
     expect_equivalent(icnarc.breakdown("1.2.3.4.5"), "1.2.3")
     expect_equivalent(icnarc.breakdown("1.2.3.4.5", 4), "1.2.3.4")
     expect_equivalent(icnarc.breakdown("10.2.3.4.5"), "10.2.3")
     expect_equivalent(icnarc.breakdown("01.2.3.4.5"), "1.2.3")
     expect_equivalent(icnarc.breakdown("1.2.3"), "1.2.3")
     expect_equivalent(icnarc.breakdown("1.2"), "1.2")
     expect_equivalent(icnarc.breakdown("1"), "1")
     expect_equivalent(icnarc.breakdown(c("1", "1.2.3.4")), c("1",
     "1.2.3"))
     })
     where 17: eval(code, test_env)
     where 18: eval(code, test_env)
     where 19: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 23: doTryCatch(return(expr), name, parentenv, handler)
     where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 25: tryCatchList(expr, classes, parentenv, handlers)
     where 26: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 27: test_code(NULL, exprs, env)
     where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 29: force(code)
     where 30: doWithOneRestart(return(expr), restart)
     where 31: withOneRestart(expr, restarts[[1L]])
     where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 33: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 34: FUN(X[[i]], ...)
     where 35: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 36: force(code)
     where 37: doWithOneRestart(return(expr), restart)
     where 38: withOneRestart(expr, restarts[[1L]])
     where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 40: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 42: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 43: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 44: test_check("cleanEHR")
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (r, digits = 3)
     {
     cols <- strsplit(r, "[.]")
     cols <- lapply(cols, function(x) {
     x <- tryCatch(as.numeric(x), warning = function(w) {
     return(NA)
     })
     if (length(x) < 5)
     x <- c(x, rep(NA, 5 - length(x)))
     if (length(x) > 5)
     x <- x[1:5]
     x
     })
     cols <- t(data.frame(cols))
     rownames(cols) <- seq(nrow(cols))
     cols <- cols[, 1:digits]
     combine <- function(x) {
     x <- x[!is.na(x)]
     paste(x, collapse = ".")
     }
     if (digits == 1)
     return(as.character(cols))
     if (class(cols) == "numeric")
     return(combine(cols))
     else return(apply(cols, 1, combine))
     }
     <bytecode: 0x55973ee73cc8>
     <environment: namespace:cleanEHR>
     --- function search by body ---
     Function icnarc.breakdown in namespace cleanEHR has this body.
     ----------- END OF FAILURE REPORT --------------
     ── 1. Error: break down ICNARC code (@test_utilities.r#14) ────────────────────
     the condition has length > 1
     Backtrace:
     1. testthat::expect_equivalent(...)
     4. cleanEHR:::icnarc.breakdown(c("1", "1.2.3.4"))
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 229 | SKIPPED: 15 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: break down ICNARC code (@test_utilities.r#14)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.0
Check: tests
Result: ERROR
     Running ‘testthat.R’ [13s/14s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(cleanEHR)
     >
     >
     > test_check("cleanEHR")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     cleanEHR
     --- call from context ---
     icnarc.breakdown(c("1", "1.2.3.4"))
     --- call from argument ---
     if (class(cols) == "numeric") return(combine(cols)) else return(apply(cols,
     1, combine))
     --- R stacktrace ---
     where 1: icnarc.breakdown(c("1", "1.2.3.4"))
     where 2: eval_bare(expr, quo_get_env(quo))
     where 3: quasi_label(enquo(object), label, arg = "object")
     where 4 at testthat/test_utilities.r#14: expect_equivalent(icnarc.breakdown(c("1", "1.2.3.4")), c("1",
     "1.2.3"))
     where 5: eval(code, test_env)
     where 6: eval(code, test_env)
     where 7: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 11: doTryCatch(return(expr), name, parentenv, handler)
     where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 13: tryCatchList(expr, classes, parentenv, handlers)
     where 14: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 15: test_code(desc, code, env = parent.frame())
     where 16 at testthat/test_utilities.r#3: test_that("break down ICNARC code", {
     expect_equivalent(icnarc.breakdown("1.2.3.4.5"), "1.2.3")
     expect_equivalent(icnarc.breakdown("1.2.3.4.5", 4), "1.2.3.4")
     expect_equivalent(icnarc.breakdown("10.2.3.4.5"), "10.2.3")
     expect_equivalent(icnarc.breakdown("01.2.3.4.5"), "1.2.3")
     expect_equivalent(icnarc.breakdown("1.2.3"), "1.2.3")
     expect_equivalent(icnarc.breakdown("1.2"), "1.2")
     expect_equivalent(icnarc.breakdown("1"), "1")
     expect_equivalent(icnarc.breakdown(c("1", "1.2.3.4")), c("1",
     "1.2.3"))
     })
     where 17: eval(code, test_env)
     where 18: eval(code, test_env)
     where 19: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 23: doTryCatch(return(expr), name, parentenv, handler)
     where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 25: tryCatchList(expr, classes, parentenv, handlers)
     where 26: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 27: test_code(NULL, exprs, env)
     where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 29: force(code)
     where 30: doWithOneRestart(return(expr), restart)
     where 31: withOneRestart(expr, restarts[[1L]])
     where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 33: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 34: FUN(X[[i]], ...)
     where 35: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 36: force(code)
     where 37: doWithOneRestart(return(expr), restart)
     where 38: withOneRestart(expr, restarts[[1L]])
     where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 40: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 42: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 43: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 44: test_check("cleanEHR")
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (r, digits = 3)
     {
     cols <- strsplit(r, "[.]")
     cols <- lapply(cols, function(x) {
     x <- tryCatch(as.numeric(x), warning = function(w) {
     return(NA)
     })
     if (length(x) < 5)
     x <- c(x, rep(NA, 5 - length(x)))
     if (length(x) > 5)
     x <- x[1:5]
     x
     })
     cols <- t(data.frame(cols))
     rownames(cols) <- seq(nrow(cols))
     cols <- cols[, 1:digits]
     combine <- function(x) {
     x <- x[!is.na(x)]
     paste(x, collapse = ".")
     }
     if (digits == 1)
     return(as.character(cols))
     if (class(cols) == "numeric")
     return(combine(cols))
     else return(apply(cols, 1, combine))
     }
     <bytecode: 0x21cc298>
     <environment: namespace:cleanEHR>
     --- function search by body ---
     Function icnarc.breakdown in namespace cleanEHR has this body.
     ----------- END OF FAILURE REPORT --------------
     ── 1. Error: break down ICNARC code (@test_utilities.r#14) ────────────────────
     the condition has length > 1
     Backtrace:
     1. testthat::expect_equivalent(...)
     4. cleanEHR:::icnarc.breakdown(c("1", "1.2.3.4"))
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 229 | SKIPPED: 15 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: break down ICNARC code (@test_utilities.r#14)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 1.0
Check: tests
Result: ERROR
     Running ‘testthat.R’ [13s/14s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(cleanEHR)
     >
     >
     > test_check("cleanEHR")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     cleanEHR
     --- call from context ---
     icnarc.breakdown(c("1", "1.2.3.4"))
     --- call from argument ---
     if (class(cols) == "numeric") return(combine(cols)) else return(apply(cols,
     1, combine))
     --- R stacktrace ---
     where 1: icnarc.breakdown(c("1", "1.2.3.4"))
     where 2: eval_bare(expr, quo_get_env(quo))
     where 3: quasi_label(enquo(object), label, arg = "object")
     where 4 at testthat/test_utilities.r#14: expect_equivalent(icnarc.breakdown(c("1", "1.2.3.4")), c("1",
     "1.2.3"))
     where 5: eval(code, test_env)
     where 6: eval(code, test_env)
     where 7: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 11: doTryCatch(return(expr), name, parentenv, handler)
     where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 13: tryCatchList(expr, classes, parentenv, handlers)
     where 14: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 15: test_code(desc, code, env = parent.frame())
     where 16 at testthat/test_utilities.r#3: test_that("break down ICNARC code", {
     expect_equivalent(icnarc.breakdown("1.2.3.4.5"), "1.2.3")
     expect_equivalent(icnarc.breakdown("1.2.3.4.5", 4), "1.2.3.4")
     expect_equivalent(icnarc.breakdown("10.2.3.4.5"), "10.2.3")
     expect_equivalent(icnarc.breakdown("01.2.3.4.5"), "1.2.3")
     expect_equivalent(icnarc.breakdown("1.2.3"), "1.2.3")
     expect_equivalent(icnarc.breakdown("1.2"), "1.2")
     expect_equivalent(icnarc.breakdown("1"), "1")
     expect_equivalent(icnarc.breakdown(c("1", "1.2.3.4")), c("1",
     "1.2.3"))
     })
     where 17: eval(code, test_env)
     where 18: eval(code, test_env)
     where 19: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 23: doTryCatch(return(expr), name, parentenv, handler)
     where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 25: tryCatchList(expr, classes, parentenv, handlers)
     where 26: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 27: test_code(NULL, exprs, env)
     where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 29: force(code)
     where 30: doWithOneRestart(return(expr), restart)
     where 31: withOneRestart(expr, restarts[[1L]])
     where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 33: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 34: FUN(X[[i]], ...)
     where 35: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 36: force(code)
     where 37: doWithOneRestart(return(expr), restart)
     where 38: withOneRestart(expr, restarts[[1L]])
     where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 40: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 42: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 43: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 44: test_check("cleanEHR")
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (r, digits = 3)
     {
     cols <- strsplit(r, "[.]")
     cols <- lapply(cols, function(x) {
     x <- tryCatch(as.numeric(x), warning = function(w) {
     return(NA)
     })
     if (length(x) < 5)
     x <- c(x, rep(NA, 5 - length(x)))
     if (length(x) > 5)
     x <- x[1:5]
     x
     })
     cols <- t(data.frame(cols))
     rownames(cols) <- seq(nrow(cols))
     cols <- cols[, 1:digits]
     combine <- function(x) {
     x <- x[!is.na(x)]
     paste(x, collapse = ".")
     }
     if (digits == 1)
     return(as.character(cols))
     if (class(cols) == "numeric")
     return(combine(cols))
     else return(apply(cols, 1, combine))
     }
     <bytecode: 0x2345208>
     <environment: namespace:cleanEHR>
     --- function search by body ---
     Function icnarc.breakdown in namespace cleanEHR has this body.
     ----------- END OF FAILURE REPORT --------------
     ── 1. Error: break down ICNARC code (@test_utilities.r#14) ────────────────────
     the condition has length > 1
     Backtrace:
     1. testthat::expect_equivalent(...)
     4. cleanEHR:::icnarc.breakdown(c("1", "1.2.3.4"))
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 229 | SKIPPED: 15 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: break down ICNARC code (@test_utilities.r#14)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc