CRAN Package Check Results for Package imbalance

Last updated on 2019-12-07 00:53:35 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.0.0 50.89 76.27 127.16 ERROR
r-devel-linux-x86_64-debian-gcc 1.0.0 35.89 73.64 109.53 NOTE
r-devel-linux-x86_64-fedora-clang 1.0.0 184.96 NOTE
r-devel-linux-x86_64-fedora-gcc 1.0.0 179.60 NOTE
r-devel-windows-ix86+x86_64 1.0.0 102.00 224.00 326.00 OK
r-devel-windows-ix86+x86_64-gcc8 1.0.0 114.00 176.00 290.00 OK
r-patched-linux-x86_64 1.0.0 42.83 94.22 137.05 NOTE
r-patched-solaris-x86 1.0.0 182.70 OK
r-release-linux-x86_64 1.0.0 44.07 93.37 137.44 NOTE
r-release-windows-ix86+x86_64 1.0.0 91.00 162.00 253.00 OK
r-release-osx-x86_64 1.0.0 OK
r-oldrel-windows-ix86+x86_64 1.0.0 84.00 203.00 287.00 OK
r-oldrel-osx-x86_64 1.0.0 OK

Check Details

Version: 1.0.0
Check: use of SHLIB_OPENMP_*FLAGS in Makefiles
Result: NOTE
     src/Makevars: SHLIB_OPENMP_CXXFLAGS is included in PKG_CXXFLAGS but not in PKG_LIBS
     src/Makevars: SHLIB_OPENMP_CFLAGS is included in PKG_LIBS but linking is by C++
     src/Makevars.win: SHLIB_OPENMP_CXXFLAGS is included in PKG_CXXFLAGS but not in PKG_LIBS
     src/Makevars.win: SHLIB_OPENMP_CFLAGS is included in PKG_LIBS but linking is by C++
    Use of these macros is discussed in sect 1.2.1.1 of 'Writing R
    Extensions'. The macros for different languages may differ so the
    matching macro must be used in PKG_CXXFLAGS (etc) and match that used
    in PKG_LIBS (except for Fortran: see the manual).
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-linux-x86_64, r-release-linux-x86_64

Version: 1.0.0
Check: examples
Result: ERROR
    Running examples in 'imbalance-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: pdfos
    > ### Title: Probability density function estimation based oversampling
    > ### Aliases: pdfos
    >
    > ### ** Examples
    >
    > data(iris0)
    >
    > newSamples <- pdfos(iris0, numInstances = 100, classAttr = "Class")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    imbalance
     --- call from context ---
    pdfos(iris0, numInstances = 100, classAttr = "Class")
     --- call from argument ---
    if (class(covInverse) == "try-error") stop(paste("Not a valid method for this dataset.",
     "Variance of the positive class is not an invertible matrix"))
     --- R stacktrace ---
    where 1: pdfos(iris0, numInstances = 100, classAttr = "Class")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (dataset, numInstances, classAttr = "Class")
    {
     checkDataset(dataset)
     checkDatasetClass(dataset, classAttr)
     originalShape <- datasetStructure(dataset, classAttr)
     dataset <- toNumeric(dataset, exclude = classAttr)
     checkAllColumnsNumeric(dataset, exclude = classAttr)
     if (!is.numeric(numInstances) || numInstances <= 0)
     stop("numInstances must be a positive integer")
     minority <- selectMinority(dataset, classAttr)
     minority <- data.matrix(minority)
     covariance <- stats::var(minority)
     covInverse <- try(solve(covariance))
     if (class(covInverse) == "try-error")
     stop(paste("Not a valid method for this dataset.", "Variance of the positive class is not an invertible matrix"))
     myBandwidth <- bestGaussianBandwidth(minority, covInverse)
     samples <- minority[sample(1:nrow(minority), numInstances,
     replace = T), ]
     newSamples <- t(apply(samples, MARGIN = 1, function(row) {
     mvtnorm::rmvnorm(1, mean = data.matrix(row), sigma = myBandwidth *
     covariance, method = "chol")
     }))
     normalizeNewSamples(originalShape, newSamples)
    }
    <bytecode: 0x214fa70>
    <environment: namespace:imbalance>
     --- function search by body ---
    Function pdfos in namespace imbalance has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(covInverse) == "try-error") stop(paste("Not a valid method for this dataset.", :
     the condition has length > 1
    Calls: pdfos
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.0.0
Check: tests
Result: ERROR
     Running 'testthat.R' [35s/38s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(imbalance)
     >
     > test_check("imbalance")
     [1] "5 samples filtered by NEATER"
     [1] "17 samples filtered by NEATER"
     [1] "0 samples filtered by NEATER"
     [1] "0 samples filtered by NEATER"
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     imbalance
     --- call from context ---
     pdfos(dataset, numInstances = nInstances, classAttr = "Class")
     --- call from argument ---
     if (class(covInverse) == "try-error") stop(paste("Not a valid method for this dataset.",
     "Variance of the positive class is not an invertible matrix"))
     --- R stacktrace ---
     where 1 at testthat/testPDFOS.R#19: pdfos(dataset, numInstances = nInstances, classAttr = "Class")
     where 2 at testthat/testPDFOS.R#27: pdfosTestOutput("glass0")
     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(NULL, exprs, env)
     where 14: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 15: force(code)
     where 16: doWithOneRestart(return(expr), restart)
     where 17: withOneRestart(expr, restarts[[1L]])
     where 18: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 19: 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 20: FUN(X[[i]], ...)
     where 21: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 22: force(code)
     where 23: doWithOneRestart(return(expr), restart)
     where 24: withOneRestart(expr, restarts[[1L]])
     where 25: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 26: 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 27: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 28: 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 29: 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 30: test_check("imbalance")
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (dataset, numInstances, classAttr = "Class")
     {
     checkDataset(dataset)
     checkDatasetClass(dataset, classAttr)
     originalShape <- datasetStructure(dataset, classAttr)
     dataset <- toNumeric(dataset, exclude = classAttr)
     checkAllColumnsNumeric(dataset, exclude = classAttr)
     if (!is.numeric(numInstances) || numInstances <= 0)
     stop("numInstances must be a positive integer")
     minority <- selectMinority(dataset, classAttr)
     minority <- data.matrix(minority)
     covariance <- stats::var(minority)
     covInverse <- try(solve(covariance))
     if (class(covInverse) == "try-error")
     stop(paste("Not a valid method for this dataset.", "Variance of the positive class is not an invertible matrix"))
     myBandwidth <- bestGaussianBandwidth(minority, covInverse)
     samples <- minority[sample(1:nrow(minority), numInstances,
     replace = T), ]
     newSamples <- t(apply(samples, MARGIN = 1, function(row) {
     mvtnorm::rmvnorm(1, mean = data.matrix(row), sigma = myBandwidth *
     covariance, method = "chol")
     }))
     normalizeNewSamples(originalShape, newSamples)
     }
     <bytecode: 0x2a442c8>
     <environment: namespace:imbalance>
     --- function search by body ---
     Function pdfos in namespace imbalance has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 1. Error: (unknown) (@testPDFOS.R#27) --------------------------------------
     the condition has length > 1
     Backtrace:
     1. imbalance:::pdfosTestOutput("glass0")
     2. imbalance::pdfos(dataset, numInstances = nInstances, classAttr = "Class")
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     imbalance
     --- call from context ---
     selectedMethod(dataset = dataset, numInstances = numInstances,
     classAttr = classAttr)
     --- call from argument ---
     if (class(covInverse) == "try-error") stop(paste("Not a valid method for this dataset.",
     "Variance of the positive class is not an invertible matrix"))
     --- R stacktrace ---
     where 1: selectedMethod(dataset = dataset, numInstances = numInstances,
     classAttr = classAttr)
     where 2 at testthat/testwrappers.R#18: oversample(glass0, ratio = ratio, method = method)
     where 3 at testthat/testwrappers.R#25: wrapperTestOutputRatio("PDFOS")
     where 4: eval(code, test_env)
     where 5: eval(code, test_env)
     where 6: 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 7: doTryCatch(return(expr), name, parentenv, handler)
     where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 10: doTryCatch(return(expr), name, parentenv, handler)
     where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 12: tryCatchList(expr, classes, parentenv, handlers)
     where 13: 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 14: test_code(NULL, exprs, env)
     where 15: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 16: force(code)
     where 17: doWithOneRestart(return(expr), restart)
     where 18: withOneRestart(expr, restarts[[1L]])
     where 19: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 20: 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 21: FUN(X[[i]], ...)
     where 22: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 23: force(code)
     where 24: doWithOneRestart(return(expr), restart)
     where 25: withOneRestart(expr, restarts[[1L]])
     where 26: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 27: 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 28: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 29: 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 30: 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 31: test_check("imbalance")
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (dataset, numInstances, classAttr = "Class")
     {
     checkDataset(dataset)
     checkDatasetClass(dataset, classAttr)
     originalShape <- datasetStructure(dataset, classAttr)
     dataset <- toNumeric(dataset, exclude = classAttr)
     checkAllColumnsNumeric(dataset, exclude = classAttr)
     if (!is.numeric(numInstances) || numInstances <= 0)
     stop("numInstances must be a positive integer")
     minority <- selectMinority(dataset, classAttr)
     minority <- data.matrix(minority)
     covariance <- stats::var(minority)
     covInverse <- try(solve(covariance))
     if (class(covInverse) == "try-error")
     stop(paste("Not a valid method for this dataset.", "Variance of the positive class is not an invertible matrix"))
     myBandwidth <- bestGaussianBandwidth(minority, covInverse)
     samples <- minority[sample(1:nrow(minority), numInstances,
     replace = T), ]
     newSamples <- t(apply(samples, MARGIN = 1, function(row) {
     mvtnorm::rmvnorm(1, mean = data.matrix(row), sigma = myBandwidth *
     covariance, method = "chol")
     }))
     normalizeNewSamples(originalShape, newSamples)
     }
     <bytecode: 0x2a442c8>
     <environment: namespace:imbalance>
     --- function search by body ---
     Function pdfos in namespace imbalance has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 2. Error: (unknown) (@testwrappers.R#25) -----------------------------------
     the condition has length > 1
     Backtrace:
     1. imbalance:::wrapperTestOutputRatio("PDFOS")
     2. imbalance::oversample(glass0, ratio = ratio, method = method)
     3. imbalance:::selectedMethod(...)
    
     == testthat results ===========================================================
     [ OK: 69 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 2 ]
     1. Error: (unknown) (@testPDFOS.R#27)
     2. Error: (unknown) (@testwrappers.R#25)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.0.0
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building 'imbalance.Rmd' using rmarkdown
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    imbalance
     --- call from context ---
    pdfos(dataset = newthyroid1, numInstances = 80, classAttr = "Class")
     --- call from argument ---
    if (class(covInverse) == "try-error") stop(paste("Not a valid method for this dataset.",
     "Variance of the positive class is not an invertible matrix"))
     --- R stacktrace ---
    where 1: pdfos(dataset = newthyroid1, numInstances = 80, classAttr = "Class")
    where 2: eval(expr, envir, enclos)
    where 3: eval(expr, envir, enclos)
    where 4: withVisible(eval(expr, envir, enclos))
    where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler,
     error = eHandler, message = mHandler)
    where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir,
     enclos)), warning = wHandler, error = eHandler, message = mHandler))
    where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr,
     envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
    where 8: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos,
     debug = debug, last = i == length(out), use_try = stop_on_error !=
     2L, keep_warning = keep_warning, keep_message = keep_message,
     output_handler = output_handler, include_timing = include_timing)
    where 9: evaluate::evaluate(...)
    where 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),
     keep_message = !isFALSE(options$message), stop_on_error = if (options$error &&
     options$include) 0L else 2L, output_handler = knit_handlers(options$render,
     options))
    where 11: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE,
     keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message),
     stop_on_error = if (options$error && options$include) 0L else 2L,
     output_handler = knit_handlers(options$render, options)))
    where 12: block_exec(params)
    where 13: call_block(x)
    where 14: process_group.block(group)
    where 15: process_group(group)
    where 16: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
     error = function(e) {
     setwd(wd)
     cat(res, sep = "\n", file = output %n% "")
     message("Quitting from lines ", paste(current_lines(i),
     collapse = "-"), " (", knit_concord$get("infile"),
     ") ")
     })
    where 17: process_file(text, output)
    where 18: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet,
     encoding = encoding)
    where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
     ...)
    where 20: vweave_rmarkdown(...)
    where 21: engine$weave(file, quiet = quiet, encoding = enc)
    where 22: doTryCatch(return(expr), name, parentenv, handler)
    where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 24: tryCatchList(expr, classes, parentenv, handlers)
    where 25: tryCatch({
     engine$weave(file, quiet = quiet, encoding = enc)
     setwd(startdir)
     output <- find_vignette_product(name, by = "weave", engine = engine)
     if (!have.makefile && vignette_is_tex(output)) {
     texi2pdf(file = output, clean = FALSE, quiet = quiet)
     output <- find_vignette_product(name, by = "texi2pdf",
     engine = engine)
     }
     outputs <- c(outputs, output)
    }, error = function(e) {
     thisOK <<- FALSE
     fails <<- c(fails, file)
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 26: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/imbalance.Rcheck/vign_test/imbalance",
     ser_elibs = "/tmp/RtmpALFwSS/file33314f9daae8.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (dataset, numInstances, classAttr = "Class")
    {
     checkDataset(dataset)
     checkDatasetClass(dataset, classAttr)
     originalShape <- datasetStructure(dataset, classAttr)
     dataset <- toNumeric(dataset, exclude = classAttr)
     checkAllColumnsNumeric(dataset, exclude = classAttr)
     if (!is.numeric(numInstances) || numInstances <= 0)
     stop("numInstances must be a positive integer")
     minority <- selectMinority(dataset, classAttr)
     minority <- data.matrix(minority)
     covariance <- stats::var(minority)
     covInverse <- try(solve(covariance))
     if (class(covInverse) == "try-error")
     stop(paste("Not a valid method for this dataset.", "Variance of the positive class is not an invertible matrix"))
     myBandwidth <- bestGaussianBandwidth(minority, covInverse)
     samples <- minority[sample(1:nrow(minority), numInstances,
     replace = T), ]
     newSamples <- t(apply(samples, MARGIN = 1, function(row) {
     mvtnorm::rmvnorm(1, mean = data.matrix(row), sigma = myBandwidth *
     covariance, method = "chol")
     }))
     normalizeNewSamples(originalShape, newSamples)
    }
    <bytecode: 0x39bcb88>
    <environment: namespace:imbalance>
     --- function search by body ---
    Function pdfos in namespace imbalance has this body.
     ----------- END OF FAILURE REPORT --------------
    Quitting from lines 58-60 (imbalance.Rmd)
    Error: processing vignette 'imbalance.Rmd' failed with diagnostics:
    the condition has length > 1
    --- failed re-building 'imbalance.Rmd'
    
    SUMMARY: processing the following file failed:
     'imbalance.Rmd'
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang