* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/obliqueRF.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 ‘obliqueRF/DESCRIPTION’ ... OK * this is package ‘obliqueRF’ version ‘0.3’ * 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 ‘obliqueRF’ can be installed ... [5s/12s] OK * checking package 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 Packages in Depends field not imported from: ‘ROCR’ ‘e1071’ ‘mda’ ‘pls’ These packages need to be imported from (in the NAMESPACE file) for when this namespace is loaded but not attached. * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [9s/26s] NOTE log_wrapper: no visible global function definition for ‘glm’ log_wrapper: no visible global function definition for ‘binomial’ log_wrapper: no visible global function definition for ‘coef’ log_wrapper: no visible global function definition for ‘anova’ obliqueRF.default: no visible binding for global variable ‘predict’ obliqueRF.default: no visible global function definition for ‘prediction’ obliqueRF.default: no visible global function definition for ‘performance’ pls_wrapper: no visible global function definition for ‘kernelpls.fit’ pls_wrapper: no visible global function definition for ‘coef’ ridge_slow_wrapper: no visible global function definition for ‘gen.ridge’ ridge_slow_wrapper: no visible global function definition for ‘predict’ ridge_svd_wrapper: no visible global function definition for ‘gen.ridge’ rnd_wrapper: no visible global function definition for ‘rnorm’ svm_wrapper: no visible global function definition for ‘svm’ svm_wrapper: no visible global function definition for ‘predict’ Undefined global functions or variables: anova binomial coef gen.ridge glm kernelpls.fit performance predict prediction rnorm svm Consider adding importFrom("stats", "anova", "binomial", "coef", "glm", "predict", "rnorm") to your NAMESPACE file. * 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 examples ... ERROR Running examples in ‘obliqueRF-Ex.R’ failed The error most likely occurred in: > ### Name: importance > ### Title: Extract variable importance measure > ### Aliases: importance importance.default importance.obliqueRF > ### Keywords: regression classif tree > > ### ** Examples > > require(obliqueRF); > data(iris); > #extract feature matrix > x<-as.matrix(iris[,1:4]); > #convert to 0/1 class labels > y<-(as.numeric(iris[,5])>1)*1; > > iris.orf <- obliqueRF(x,y,training_method="log",bImportance=TRUE); obliqueRF: using logistic regression as node model. obliqueRF: no test set defined. Will use training data. ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- obliqueRF --- call from context --- findbestsplit(dframe = dframe[n_case[nd_start:nd_end], ], b_sample = b_sample[n_case[nd_start:nd_end]], class_n, nd_start, nd_length, num_vars, num_split_vars, num_classes, node_train_method, node_pred_method, node_impurity_method, impStruct) --- call from argument --- (class(z) == "try-error") || (sum(is.na(z$coef)) > 0) --- R stacktrace --- where 1: findbestsplit(dframe = dframe[n_case[nd_start:nd_end], ], b_sample = b_sample[n_case[nd_start:nd_end]], class_n, nd_start, nd_length, num_vars, num_split_vars, num_classes, node_train_method, node_pred_method, node_impurity_method, impStruct) where 2: doTryCatch(return(expr), name, parentenv, handler) where 3: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 4: tryCatchList(expr, classes, parentenv, handlers) where 5: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e)) }) where 6: try(findbestsplit(dframe = dframe[n_case[nd_start:nd_end], ], b_sample = b_sample[n_case[nd_start:nd_end]], class_n, nd_start, nd_length, num_vars, num_split_vars, num_classes, node_train_method, node_pred_method, node_impurity_method, impStruct), TRUE) where 7: buildtree(dframe, b_sample, class_n, n_case, nr_nodes, nd_min_size, nr_diff_cases, num_vars, num_split_vars, num_classes, node_train_method, node_pred_method, node_impurity_method, num_samples, impStruct) where 8: obliqueRF.default(x, y, training_method = "log", bImportance = TRUE) where 9: obliqueRF(x, y, training_method = "log", bImportance = TRUE) --- value of length: 2 type: logical --- [1] FALSE FALSE --- function from context --- function (dframe, b_sample, class_n, nd_start, nd_length, num_vars, num_split_vars, num_classes, node_train_method, node_pred_method, node_impurity_method, impStruct) { vars <- sample(1:num_vars, num_split_vars) temp_matrix <- dframe[, vars] cls <- dframe[, num_vars + 1] ow <- options("warn") options(warn = -1) z <- try(node_train_method(x = temp_matrix, y = cls, ind = b_sample, impStruct = impStruct), TRUE) options(ow) lab <- " " if ((class(z) == "try-error") || (sum(is.na(z$coef)) > 0) || (table(cls) == 1) || is.null(z$coef)) { jstat = 1 res <- list(jstat = jstat) return(res) } impurity_meas <- node_impurity_method(temp_matrix, cls, b_sample, class_n, num_classes, nd_length, z) if (impurity_meas$jstat == 1) return(impurity_meas) res <- list(jstat = impurity_meas$jstat, variables = vars, isplit = impurity_meas$isplit, split_vect = impurity_meas$split_vect, decsplit = impurity_meas$decsplit, decsplit_perc = impurity_meas$decsplit_perc, best_split_value = impurity_meas$best_split_value, ridge_value = z$ridge_value, training_stats = z$coef, signif = z$signif, lab = z$lab) return(res) } --- function search by body --- Function findbestsplit in namespace obliqueRF has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: length > 1 in coercion to logical * 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/obliqueRF.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 2:02.48, 39.07 + 6.08