CRAN Package Check Results for Package whiboclustering

Last updated on 2019-12-21 10:48:05 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.1.2 5.27 50.05 55.32 ERROR
r-devel-linux-x86_64-debian-gcc 0.1.2 4.21 36.63 40.84 ERROR
r-devel-linux-x86_64-fedora-clang 0.1.2 66.10 OK
r-devel-linux-x86_64-fedora-gcc 0.1.2 61.64 OK
r-devel-windows-ix86+x86_64 0.1.2 15.00 64.00 79.00 OK
r-devel-windows-ix86+x86_64-gcc8 0.1.2 15.00 63.00 78.00 OK
r-patched-linux-x86_64 0.1.2 OK
r-patched-solaris-x86 0.1.2 74.40 OK
r-release-linux-x86_64 0.1.2 4.35 43.88 48.23 OK
r-release-windows-ix86+x86_64 0.1.2 13.00 74.00 87.00 OK
r-release-osx-x86_64 0.1.2 OK
r-oldrel-windows-ix86+x86_64 0.1.2 8.00 73.00 81.00 OK
r-oldrel-osx-x86_64 0.1.2 OK

Check Details

Version: 0.1.2
Check: examples
Result: ERROR
    Running examples in 'whiboclustering-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: plot.whibo_cluster
    > ### Title: Plot WhiBo Cluster Representatives
    > ### Aliases: plot.whibo_cluster
    >
    > ### ** Examples
    >
    > data <- iris[, 1:4] #Numerical data only
    >
    > model <- whibo_clustering(data = data, k = 3)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    whiboclustering
     --- call from context ---
    wc_initialize(data = data, k = k, initialization_type = cluster_initialization_type)
     --- call from argument ---
    if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
    }
     --- R stacktrace ---
    where 1: wc_initialize(data = data, k = k, initialization_type = cluster_initialization_type)
    where 2: whibo_clustering(data = data, k = 3)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (data, k = 3, initialization_type)
    {
     if (!(tolower(initialization_type) %in% tolower(wc_init_types$Type))) {
     stop("Please enter initialization function that is available in wc_init_types data frame")
     }
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (!is.numeric(k)) {
     stop("k should be numeric")
     }
     centroids <- eval(call(name = as.character(wc_init_types$Method[tolower(wc_init_types$Type) ==
     tolower(initialization_type)]), data, k))
     return(centroids)
    }
    <bytecode: 0x182c2b8>
    <environment: namespace:whiboclustering>
     --- function search by body ---
    Function wc_initialize in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (!(class(data) %in% c("data.frame", "matrix"))) { :
     the condition has length > 1
    Calls: whibo_clustering -> wc_initialize
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.1.2
Check: tests
Result: ERROR
     Running 'testthat.R' [18s/20s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(whiboclustering)
     Loading required package: clusterCrit
     Loading required package: cluster
     >
     > test_check("whiboclustering")
     -- 1. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     -- 2. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     -- 3. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     -- 4. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     -- 5. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     -- 6. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     -- 7. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     -- 8. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     -- 9. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     -- 10. Failure: Result of normalization is data.frame or data.matrix (@test-wc-n
     class(norm_data$data) == "matrix" isn't true.
    
     -- 11. Failure: Result of normalization is data.frame or data.matrix (@test-wc-n
     class(norm_data$data) == "matrix" isn't true.
    
     -- 12. Failure: Result of normalization is data.frame or data.matrix (@test-wc-n
     class(norm_data$data) == "matrix" isn't true.
    
     -- 13. Failure: Result of normalization is data.frame or data.matrix (@test-wc-n
     class(norm_data$data) == "matrix" isn't true.
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_no(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#69: wc_norm_no(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#66: test_that("No normalization and original data should be the same",
     {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_no(data)$data
     expect_true(sum(data != norm_data) == 0)
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     norm_data <- as.matrix(data)
     output <- list(data = norm_data, model = NULL)
     return(output)
     }
     <bytecode: 0x3cf56b0>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_no in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 14. Error: No normalization and original data should be the same (@test-wc-no
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_no(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_z(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#77: wc_norm_z(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#74: test_that("Z transformation should result in zero mean and one standard deviation",
     {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_z(data)$data
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(mean(x) > -1e-07 || mean(x) < 1e-07)
     })
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(sd(x) > 0.9999999 || mean(x) < 1.0000001)
     })
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (is.null(model)) {
     norm_data <- scale(x = data, center = TRUE, scale = TRUE)
     output <- list(data = norm_data, model = list(center = attr(x = norm_data,
     which = "scaled:center"), scale = attr(x = norm_data,
     which = "scaled:scale")))
     }
     else {
     norm_data <- scale(x = data, center = model$center, scale = model$scale)
     output <- list(data = norm_data, model = model)
     }
     return(output)
     }
     <bytecode: 0x3f8f168>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_z in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 15. Error: Z transformation should result in zero mean and one standard devia
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_z(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_l2(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#87: wc_norm_l2(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#84: test_that("L2 normalization should sum to one if elements are squared",
     {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_l2(data)$data
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(sum(x^2) > 0.9999999 || sum(x^2) < 1.00000001)
     })
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (is.null(model)) {
     model <- c()
     norm_data <- apply(X = data, MARGIN = 2, FUN = function(x) {
     model <<- append(model, sqrt(sum(x^2, na.rm = TRUE)))
     x/sqrt(sum(x^2, na.rm = TRUE))
     })
     }
     else {
     norm_data <- sweep(x = data, MARGIN = 2, STATS = model,
     FUN = "/")
     }
     output <- list(data = norm_data, model = model)
     return(output)
     }
     <bytecode: 0x3d04e28>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_l2 in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 16. Error: L2 normalization should sum to one if elements are squared (@test-
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_l2(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_l1(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#96: wc_norm_l1(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#93: test_that("L1 normalization should sum to one", {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_l1(data)$data
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(sum(x) > 0.9999999 || sum(x) < 1.00000001)
     })
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (is.null(model)) {
     model <- c()
     norm_data <- apply(X = data, MARGIN = 2, FUN = function(x) {
     model <<- append(model, sum(x, na.rm = TRUE))
     x/sum(x, na.rm = TRUE)
     })
     }
     else {
     norm_data <- sweep(x = data, MARGIN = 2, STATS = model,
     FUN = "/")
     }
     output <- list(data = norm_data, model = model)
     return(output)
     }
     <bytecode: 0x3d004c0>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_l1 in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 17. Error: L1 normalization should sum to one (@test-wc-normalization.R#96)
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_l1(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_linf(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#105: wc_norm_linf(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#102: test_that("Linf normalization should have max equal to 1", {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_linf(data)$data
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(max(x) == 1)
     })
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (is.null(model)) {
     model <- c()
     norm_data <- apply(X = data, MARGIN = 2, FUN = function(x) {
     model <<- append(model, max(x, na.rm = TRUE))
     x/max(x, na.rm = TRUE)
     })
     }
     else {
     norm_data <- sweep(x = data, MARGIN = 2, STATS = model,
     FUN = "/")
     }
     output <- list(data = norm_data, model = model)
     return(output)
     }
     <bytecode: 0x3f94988>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_linf in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 18. Error: Linf normalization should have max equal to 1 (@test-wc-normalizat
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_linf(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_max_min(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#113: wc_norm_max_min(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#110: test_that("Max-Min normalization should result in min = 0 and max = 1",
     {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_max_min(data)$data
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(min(x) == 0)
     })
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(max(x) == 1)
     })
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (is.null(model)) {
     mins <- c()
     diffs <- c()
     norm_data <- apply(X = data, MARGIN = 2, FUN = function(x) {
     mins <<- append(mins, min(x, na.rm = TRUE))
     diffs <<- append(diffs, diff(range(x, na.rm = TRUE)))
     (x - min(x, na.rm = TRUE))/diff(range(x, na.rm = TRUE))
     })
     output <- list(data = norm_data, model = list(mins = mins,
     diffs = diffs))
     }
     else {
     norm_data <- sweep(x = sweep(x = data, MARGIN = 2, STATS = model$mins,
     FUN = "-"), MARGIN = 2, STATS = model$diffs, FUN = "/")
     output <- list(data = norm_data, model = model)
     }
     return(output)
     }
     <bytecode: 0x3e3a8d8>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_max_min in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 19. Error: Max-Min normalization should result in min = 0 and max = 1 (@test-
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_max_min(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_mean(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#122: wc_norm_mean(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#119: test_that("Mean normalization should result in mean = 0", {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_mean(data)$data
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(mean(x) > -1e-07 || mean(x) < 1e-07)
     })
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (is.null(model)) {
     means <- c()
     diffs <- c()
     norm_data <- apply(X = data, MARGIN = 2, FUN = function(x) {
     means <<- append(means, mean(x, na.rm = TRUE))
     diffs <<- append(diffs, diff(range(x, na.rm = TRUE)))
     (x - mean(x, na.rm = TRUE))/diff(range(x, na.rm = TRUE))
     })
     output <- list(data = norm_data, model = list(means = means,
     diffs = diffs))
     }
     else {
     norm_data <- sweep(x = sweep(x = data, MARGIN = 2, STATS = model$means,
     FUN = "-"), MARGIN = 2, STATS = model$diffs, FUN = "/")
     output <- list(data = norm_data, model = model)
     }
     return(output)
     }
     <bytecode: 0x3e4a070>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_mean in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 20. Error: Mean normalization should result in mean = 0 (@test-wc-normalizati
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_mean(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_log(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#130: wc_norm_log(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#127: test_that("Log transformation result in same mean for every column",
     {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_log(data)$data
     expect_true(sd(apply(X = norm_data, MARGIN = 2, function(x) {
     mean(x)
     })) < 1e-07)
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (sum(data < 0) > 0) {
     stop("Negative values present")
     }
     if (is.null(model)) {
     model <- c()
     norm_data <- apply(X = data, MARGIN = 2, FUN = function(x) {
     model <<- append(model, log(x = prod(x, na.rm = TRUE)))
     log(x = x)/log(x = prod(x, na.rm = TRUE))
     })
     }
     else {
     norm_data <- sweep(x = log(data), MARGIN = 2, STATS = model,
     FUN = "/")
     }
     output <- list(data = norm_data, model = model)
     return(output)
     }
     <bytecode: 0x3e57d98>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_log in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 21. Error: Log transformation result in same mean for every column (@test-wc-
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_log(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_log(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1: wc_norm_log(data)
     where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
     where 3: withCallingHandlers({
     code
     NULL
     }, error = function(cnd) {
     if (can_entrace(cnd)) {
     cnd <- cnd_entrace(cnd)
     }
     return_from(env, cnd)
     })
     where 4: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)),
     ...)
     where 5: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
     where 6 at testthat/test-wc-normalization.R#141: expect_error(wc_norm_log(data))
     where 7: eval(code, test_env)
     where 8: eval(code, test_env)
     where 9: 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 10: doTryCatch(return(expr), name, parentenv, handler)
     where 11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 12: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 13: doTryCatch(return(expr), name, parentenv, handler)
     where 14: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 15: tryCatchList(expr, classes, parentenv, handlers)
     where 16: 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 17: test_code(desc, code, env = parent.frame())
     where 18 at testthat/test-wc-normalization.R#136: test_that("Log transformation will fail is negative value is present",
     {
     data <- as.matrix(iris[, 1:4])
     data[1, 1] <- -1
     expect_error(wc_norm_log(data))
     })
     where 19: eval(code, test_env)
     where 20: eval(code, test_env)
     where 21: 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 22: doTryCatch(return(expr), name, parentenv, handler)
     where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 25: doTryCatch(return(expr), name, parentenv, handler)
     where 26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 27: tryCatchList(expr, classes, parentenv, handlers)
     where 28: 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 29: test_code(NULL, exprs, env)
     where 30: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 31: force(code)
     where 32: doWithOneRestart(return(expr), restart)
     where 33: withOneRestart(expr, restarts[[1L]])
     where 34: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 35: 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 36: FUN(X[[i]], ...)
     where 37: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 38: force(code)
     where 39: doWithOneRestart(return(expr), restart)
     where 40: withOneRestart(expr, restarts[[1L]])
     where 41: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 42: 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 43: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 44: 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 45: 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 46: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (sum(data < 0) > 0) {
     stop("Negative values present")
     }
     if (is.null(model)) {
     model <- c()
     norm_data <- apply(X = data, MARGIN = 2, FUN = function(x) {
     model <<- append(model, log(x = prod(x, na.rm = TRUE)))
     log(x = x)/log(x = prod(x, na.rm = TRUE))
     })
     }
     else {
     norm_data <- sweep(x = log(data), MARGIN = 2, STATS = model,
     FUN = "/")
     }
     output <- list(data = norm_data, model = model)
     return(output)
     }
     <bytecode: 0x3e57d98>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_log in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_non_monotonic(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#147: wc_norm_non_monotonic(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#144: test_that("Non-monotic normalization will create max = 1", {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_non_monotonic(data)$data
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(max(x) == 1)
     })
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (is.null(model)) {
     maxs <- c()
     vars <- c()
     norm_data <- apply(X = data, MARGIN = 2, FUN = function(x) {
     maxs <<- append(maxs, max(x, na.rm = TRUE))
     vars <<- append(vars, stats::var(x, na.rm = TRUE))
     exp(-(x - max(x, na.rm = TRUE))^2/stats::var(x, na.rm = TRUE))
     })
     output <- list(data = norm_data, model = list(maxs = maxs,
     vars = vars))
     }
     else {
     norm_data <- exp(-sweep(x = sweep(x = data, MARGIN = 2,
     STATS = model$maxs, FUN = "-")^2, MARGIN = 2, STATS = model$vars,
     FUN = "/"))
     output <- list(data = norm_data, model = model)
     }
     return(output)
     }
     <bytecode: 0x3f41890>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_non_monotonic in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 22. Error: Non-monotic normalization will create max = 1 (@test-wc-normalizat
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_non_monotonic(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_comprehensive(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#155: wc_norm_comprehensive(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#152: test_that("Comprehensive will make min = 0", {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_comprehensive(data)$data
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(min(x) == 0)
     })
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (is.null(model)) {
     mins <- c()
     maxs <- c()
     norm_data <- apply(X = data, MARGIN = 2, FUN = function(x) {
     mins <<- append(mins, min(x, na.rm = TRUE))
     maxs <<- append(maxs, max(x, na.rm = TRUE))
     1 - exp(abs(x - min(x, na.rm = TRUE))/(min(x, na.rm = TRUE) -
     max(x, na.rm = TRUE)))
     })
     output <- list(data = norm_data, model = list(mins = mins,
     maxs = maxs))
     }
     else {
     norm_data <- 1 - exp(sweep(x = abs(sweep(x = data, MARGIN = 2,
     STATS = model$mins, FUN = "-")), MARGIN = 2, STATS = model$mins -
     model$maxs, FUN = "/"))
     output <- list(data = norm_data, model = model)
     }
     return(output)
     }
     <bytecode: 0x3f6f498>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_comprehensive in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 23. Error: Comprehensive will make min = 0 (@test-wc-normalization.R#155) --
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_comprehensive(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_decimal_scaling(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#163: wc_norm_decimal_scaling(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#160: test_that("Decimal Scaling will be greater or equal than 0",
     {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_decimal_scaling(data)$data
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(min(x) > 0)
     })
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (is.null(model)) {
     norm_data <- scale(x = data, center = FALSE, scale = 10^(ceiling(log10(apply(X = abs(data),
     MARGIN = 2, FUN = max)))))
     output <- list(data = norm_data, model = attr(x = norm_data,
     which = "scaled:scale"))
     }
     else {
     norm_data <- scale(x = data, center = FALSE, scale = model)
     output <- list(data = norm_data, model = model)
     }
     return(output)
     }
     <bytecode: 0x3e22748>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_decimal_scaling in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 24. Error: Decimal Scaling will be greater or equal than 0 (@test-wc-normaliz
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_decimal_scaling(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_sigmoid(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#171: wc_norm_sigmoid(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#168: test_that("Sigmoid normalization will always be between -1 and 1",
     {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_sigmoid(data)$data
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(min(x) > -1)
     })
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(max(x) < 1)
     })
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (is.null(model)) {
     norm_data <- (1 - exp(-scale(x = data, center = TRUE,
     scale = TRUE)))/(1 + exp(-scale(x = data, center = TRUE,
     scale = TRUE)))
     output <- list(data = norm_data, model = list(center = attr(x = norm_data,
     which = "scaled:center"), scale = attr(x = norm_data,
     which = "scaled:scale")))
     }
     else {
     norm_data <- (1 - exp(-scale(x = data, center = model$center,
     scale = model$scale)))/(1 + exp(-scale(x = data,
     center = model$center, scale = model$scale)))
     output <- list(data = norm_data, model = model)
     }
     return(output)
     }
     <bytecode: 0x3e0e5e0>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_sigmoid in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 25. Error: Sigmoid normalization will always be between -1 and 1 (@test-wc-no
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_sigmoid(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_norm_softmax(data)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1 at testthat/test-wc-normalization.R#180: wc_norm_softmax(data)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-wc-normalization.R#177: test_that("Softmax normalization will always be between 0 and 1",
     {
     data <- as.matrix(iris[, 1:4])
     norm_data <- wc_norm_softmax(data)$data
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(min(x) > 0)
     })
     apply(X = norm_data, MARGIN = 2, FUN = function(x) {
     expect_true(max(x) < 1)
     })
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: 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 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: 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 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: 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 40: 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 41: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, model = NULL)
     {
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (is.null(model)) {
     norm_data <- 1/(1 + exp(-scale(x = data, center = TRUE,
     scale = TRUE)))
     output <- list(data = norm_data, model = list(center = attr(x = norm_data,
     which = "scaled:center"), scale = attr(x = norm_data,
     which = "scaled:scale")))
     }
     else {
     norm_data <- 1/(1 + exp(-scale(x = data, center = model$center,
     scale = model$scale)))
     output <- list(data = norm_data, model = model)
     }
     return(output)
     }
     <bytecode: 0x3ec1d10>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_norm_softmax in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 26. Error: Softmax normalization will always be between 0 and 1 (@test-wc-nor
     the condition has length > 1
     Backtrace:
     1. whiboclustering:::wc_norm_softmax(data)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     whiboclustering
     --- call from context ---
     wc_initialize(data = data, k = k, initialization_type = cluster_initialization_type)
     --- call from argument ---
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     --- R stacktrace ---
     where 1: wc_initialize(data = data, k = k, initialization_type = cluster_initialization_type)
     where 2 at testthat/test-whibo-clustering.R#9: whibo_clustering(data = data, k = k)
     where 3: eval(code, test_env)
     where 4: eval(code, test_env)
     where 5: 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 6: doTryCatch(return(expr), name, parentenv, handler)
     where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 8: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 9: doTryCatch(return(expr), name, parentenv, handler)
     where 10: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 11: tryCatchList(expr, classes, parentenv, handlers)
     where 12: 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 13: test_code(desc, code, env = parent.frame())
     where 14 at testthat/test-whibo-clustering.R#4: test_that("WhiBo Cluster Design", {
     data <- iris[, 1:4]
     k <- 3
     model <- whibo_clustering(data = data, k = k)
     expect_equal(nrow(model$centroids), k)
     expect_equal(length(model$assignments), nrow(data))
     })
     where 15: eval(code, test_env)
     where 16: eval(code, test_env)
     where 17: 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 18: doTryCatch(return(expr), name, parentenv, handler)
     where 19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 20: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 21: doTryCatch(return(expr), name, parentenv, handler)
     where 22: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 23: tryCatchList(expr, classes, parentenv, handlers)
     where 24: 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 25: test_code(NULL, exprs, env)
     where 26: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 27: force(code)
     where 28: doWithOneRestart(return(expr), restart)
     where 29: withOneRestart(expr, restarts[[1L]])
     where 30: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 31: 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 32: FUN(X[[i]], ...)
     where 33: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 34: force(code)
     where 35: doWithOneRestart(return(expr), restart)
     where 36: withOneRestart(expr, restarts[[1L]])
     where 37: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 38: 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 39: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 40: 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 41: 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 42: test_check("whiboclustering")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (data, k = 3, initialization_type)
     {
     if (!(tolower(initialization_type) %in% tolower(wc_init_types$Type))) {
     stop("Please enter initialization function that is available in wc_init_types data frame")
     }
     if (!(class(data) %in% c("data.frame", "matrix"))) {
     stop("Data should be data.frame or matrix")
     }
     if (!is.numeric(k)) {
     stop("k should be numeric")
     }
     centroids <- eval(call(name = as.character(wc_init_types$Method[tolower(wc_init_types$Type) ==
     tolower(initialization_type)]), data, k))
     return(centroids)
     }
     <bytecode: 0x3e3ff38>
     <environment: namespace:whiboclustering>
     --- function search by body ---
     Function wc_initialize in namespace whiboclustering has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 27. Error: WhiBo Cluster Design (@test-whibo-clustering.R#9) ---------------
     the condition has length > 1
     Backtrace:
     1. whiboclustering::whibo_clustering(data = data, k = k)
     2. whiboclustering:::wc_initialize(data = data, k = k, initialization_type = cluster_initialization_type)
    
     == testthat results ===========================================================
     [ OK: 626 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 27 ]
     1. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     2. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     3. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     4. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     5. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     6. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     7. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     8. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     9. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     1. ...
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.1.2
Check: tests
Result: ERROR
     Running ‘testthat.R’ [11s/16s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(whiboclustering)
     Loading required package: clusterCrit
     Loading required package: cluster
     >
     > test_check("whiboclustering")
     ── 1. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     ── 2. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     ── 3. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     ── 4. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     ── 5. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     ── 6. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     ── 7. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     ── 8. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     ── 9. Failure: Result of normalization is data.frame or data.matrix (@test-wc-no
     class(norm_data$data) == "matrix" isn't true.
    
     ── 10. Failure: Result of normalization is data.frame or data.matrix (@test-wc-n
     class(norm_data$data) == "matrix" isn't true.
    
     ── 11. Failure: Result of normalization is data.frame or data.matrix (@test-wc-n
     class(norm_data$data) == "matrix" isn't true.
    
     ── 12. Failure: Result of normalization is data.frame or data.matrix (@test-wc-n
     class(norm_data$data) == "matrix" isn't true.
    
     ── 13. Failure: Result of normalization is data.frame or data.matrix (@test-wc-n
     class(norm_data$data) == "matrix" isn't true.
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 690 | SKIPPED: 0 | WARNINGS: 50 | FAILED: 13 ]
     1. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     2. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     3. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     4. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     5. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     6. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     7. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     8. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     9. Failure: Result of normalization is data.frame or data.matrix (@test-wc-normalization.R#28)
     1. ...
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc