* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/NoiseFiltersR.Rcheck’ * using R Under development (unstable) (2022-04-26 r82260) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘NoiseFiltersR/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘NoiseFiltersR’ version ‘0.1.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘NoiseFiltersR’ can be installed ... [10s/28s] OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... NOTE Namespace in Imports field not imported from: ‘rJava’ All declared Imports should be used. * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [21s/64s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking LazyData ... NOTE 'LazyData' is specified without a 'data' directory * checking sizes of PDF files under ‘inst/doc’ ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... [14s/32s] OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [7s/16s] [7s/18s] ERROR Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(NoiseFiltersR) > > test_check("NoiseFiltersR") ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- NoiseFiltersR --- call from context --- FUN(X[[i]], ...) --- call from argument --- dim(trainn) == dim(test) && all(trainn == test) --- R stacktrace --- where 1: FUN(X[[i]], ...) where 2: lapply(X = X, FUN = FUN, ...) where 3: sapply(c(1, 3, 5), function(k) { if (dim(trainn) == dim(test) && all(trainn == test)) { sapply(1:nrow(trainn), function(i) { kknn::kknn(formula = formu, train = trainn[-i, ], test = test[i, ], k = k, kernel = "rectangular")$fitted.values }) } else { kknn::kknn(formula = formu, train = trainn, test = test, k = k, kernel = "rectangular")$fitted.values } }) where 4: predictions(trainn = x, test = x, formu) where 5: hybridRepairFilter.default(x = modFrame, ..., classColumn = 1) where 6: hybridRepairFilter.formula(Species ~ ., data = trainData, noiseAction = "hybrid") where 7 at test-hybridRepairFilter.r#5: hybridRepairFilter(Species ~ ., data = trainData, noiseAction = "hybrid") where 8: eval(code, test_env) where 9: eval(code, test_env) where 10: 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 11: doTryCatch(return(expr), name, parentenv, handler) where 12: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 13: tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) where 14: doTryCatch(return(expr), name, parentenv, handler) where 15: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]) where 16: tryCatchList(expr, classes, parentenv, handlers) where 17: 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 18: test_code(NULL, exprs, env) where 19: source_file(path, child_env(env), wrap = wrap) where 20: FUN(X[[i]], ...) where 21: lapply(test_paths, test_one_file, env = env, wrap = wrap) 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(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL }) where 26: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, wrap = wrap)) where 27: test_files(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap, load_package = load_package) where 28: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap, load_package = load_package, parallel = parallel) where 29: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") where 30: test_check("NoiseFiltersR") --- value of length: 2 type: logical --- [1] TRUE TRUE --- function from context --- function (k) { if (dim(trainn) == dim(test) && all(trainn == test)) { sapply(1:nrow(trainn), function(i) { kknn::kknn(formula = formu, train = trainn[-i, ], test = test[i, ], k = k, kernel = "rectangular")$fitted.values }) } else { kknn::kknn(formula = formu, train = trainn, test = test, k = k, kernel = "rectangular")$fitted.values } } --- function search by body --- ----------- END OF FAILURE REPORT -------------- Fatal error: length > 1 in coercion to logical * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking re-building of vignette outputs ... [21s/45s] OK * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR, 2 NOTEs See ‘/data/gannet/ripley/R/packages/tests-LENGTH1/NoiseFiltersR.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 4:57.57, 104.69 + 10.63