* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/NetComp.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 ‘NetComp/DESCRIPTION’ ... OK * this is package ‘NetComp’ version ‘1.6’ * 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 ‘NetComp’ can be installed ... [4s/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 ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [5s/13s] NOTE netVal: no visible global function definition for ‘cutree’ netVal: no visible global function definition for ‘hclust’ netVal: no visible global function definition for ‘as.dist’ Undefined global functions or variables: as.dist cutree hclust Consider adding importFrom("stats", "as.dist", "cutree", "hclust") 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 line endings in C/C++/Fortran sources/headers ... OK * checking pragmas in C/C++ headers and code ... OK * checking compilation flags used ... OK * checking compiled code ... NOTE File ‘NetComp/libs/NetComp.so’: Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’ It is good practice to register native routines and to disable symbol search. See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual. * checking examples ... ERROR Running examples in ‘NetComp-Ex.R’ failed The error most likely occurred in: > ### Name: netDiff > ### Title: Network Difference > ### Aliases: netDiff > > ### ** Examples > > #using the state.x77 and USArrest datasets > #remove data from states for illustration > ssArrest<-subset(t(USArrests), select=-c(Alabama,Colorado,Delaware)) > ssState<-subset(t(state.x77), select=-c(Alabama, Arizona, Iowa)) > arrestCor<-cor(ssArrest) > stateCor<-cor(ssState) > dataDiff<-netDiff(stateCor, arrestCor) ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- NetComp --- call from context --- netDiff(stateCor, arrestCor) --- call from argument --- (row.names(matrix1) != colnames(matrix1)) || (nrow(matrix1) != ncol(matrix1)) --- R stacktrace --- where 1: netDiff(stateCor, arrestCor) --- value of length: 47 type: logical --- [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [37] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE --- function from context --- function (matrix1, matrix2, cutoff = NULL, ...) { if ((row.names(matrix1) != colnames(matrix1)) || (nrow(matrix1) != ncol(matrix1))) { print("Matrix1 must be square and have same row/column names") return(0) } if ((row.names(matrix2) != colnames(matrix2)) || (nrow(matrix2) != ncol(matrix2))) { print("Matrix2 must be square and have same row/column names") return(0) } matrix1 <- matrix1[sort(row.names(matrix1)), sort(colnames(matrix1))] matrix2 <- matrix2[sort(row.names(matrix2)), sort(colnames(matrix2))] if (is.null(cutoff)) { ori.m1 <- matrix_threshold(matrix1, threshold = 0, minval = 0, abs = TRUE, rm.na = TRUE, maxval = NULL) matrix1 <- matrix_threshold(matrix1, threshold = 0, minval = 0, abs = TRUE, rm.na = TRUE, maxval = 1) matrix2 <- matrix_threshold(matrix2, threshold = 0, minval = 0, abs = TRUE, rm.na = TRUE, maxval = 1) } else { ori.m1 <- matrix_threshold(matrix1, threshold = cutoff, minval = 0, abs = TRUE, rm.na = TRUE, maxval = NULL) matrix1 <- matrix_threshold(matrix1, threshold = cutoff, minval = 0, abs = TRUE, rm.na = TRUE, maxval = 1) matrix2 <- matrix_threshold(matrix2, threshold = cutoff, minval = 0, abs = TRUE, rm.na = TRUE, maxval = 1) } shared.names <- intersect(colnames(matrix1), colnames(matrix2)) total.names <- sort(union(colnames(matrix1), colnames(matrix2))) missing2.names <- setdiff(colnames(matrix1), colnames(matrix2)) missing1.names <- setdiff(colnames(matrix2), colnames(matrix1)) l1 <- length(colnames(matrix1)) l2 <- length(colnames(matrix2)) if (length(missing2.names) > 0) { temp <- matrix(0, nrow = l2, ncol = length(missing2.names)) temp <- as.data.frame(temp) colnames(temp) <- missing2.names m2.temp <- cbind(matrix2, temp) temp2 <- matrix(0, nrow = length(missing2.names), ncol = length(total.names)) temp2 <- as.data.frame(temp2) colnames(temp2) <- colnames(m2.temp) rownames(temp2) <- missing2.names m2 <- rbind(m2.temp, temp2) } else { m2 <- matrix2 } if (length(missing1.names) > 0) { temp <- matrix(0, nrow = l1, ncol = length(missing1.names)) temp <- as.data.frame(temp) colnames(temp) <- missing1.names m1.temp <- cbind(matrix1, temp) temp2 <- matrix(0, nrow = length(missing1.names), ncol = length(total.names)) temp2 <- as.data.frame(temp2) colnames(temp2) <- colnames(m1.temp) rownames(temp2) <- missing1.names m1 <- rbind(m1.temp, temp2) } else { m1 <- matrix1 } matrix1b <- m1[total.names, total.names] matrix2b <- m2[total.names, total.names] temp.mat <- matrix1b - matrix2b mat3 <- temp.mat[colnames(ori.m1), colnames(ori.m1)] matrix3 <- mat3 * ori.m1 matrix3 } --- function search by body --- Function netDiff in namespace NetComp 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/NetComp.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 1:39.10, 29.90 + 6.13