* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/chi2x3way.Rcheck’ * using R Under development (unstable) (2022-04-03 r82074) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘chi2x3way/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘chi2x3way’ version ‘1.1’ * 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 ‘chi2x3way’ can be installed ... 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 ... [9s/12s] 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 contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... ERROR Running examples in ‘chi2x3way-Ex.R’ failed The error most likely occurred in: > ### Name: tau3scen1 > ### Title: Marcotorchino's index for three-way contingency tables under > ### Scenario 1 > ### Aliases: tau3scen1 > ### Keywords: Marcotorchino three-way index > > ### ** Examples > > data(olive) > tau3scen1(olive) ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- chi2x3way --- call from context --- tau3scen1(olive) --- call from argument --- (pi == fi) && (pj == fj) --- R stacktrace --- where 1: tau3scen1(olive) --- value of length: 6 type: logical --- A B C D E F FALSE FALSE FALSE FALSE FALSE FALSE --- function from context --- function (X, pi = rep(1/dim(X)[[1]], dim(X)[[1]]), pj = rep(1/dim(X)[[2]], dim(X)[[2]]), pk = rep(1/dim(X)[[3]], dim(X)[[3]]), digits = 3) { nn <- dim(X) ni <- nn[1] nj <- nn[2] nk <- nn[3] n <- sum(X) ui <- rep(1, ni) uj <- rep(1, nj) uk <- rep(1, nk) p3 <- X/n if (length(dim(X)) != 3) stop("X is not a three-way table \n") p1jk <- ui %o% pj %o% pk fijk <- pi %o% pj %o% pk devt <- 1 - sum(pi^2) tau3 <- sum((p3 - fijk)^2/p1jk) itau3 <- tau3/devt fi <- apply(p3, 1, sum) fj <- apply(p3, 2, sum) fk <- apply(p3, 3, sum) p1j <- ui %o% pj p1k <- ui %o% pk p2ij <- pi %o% pj p2ik <- pi %o% pk khiI <- sum((fi - pi)^2) khiJ <- 1/ni * sum(((fj - pj)^2)/pj) khiK <- 1/ni * sum(((fk - pk)^2)/pk) pij <- apply(p3, c(1, 2), sum) pik <- apply(p3, c(1, 3), sum) pjk <- apply(p3, c(2, 3), sum) p2jk <- pj %o% pk tauij <- sum((pij - (fi %*% t(pj)) - t(as.matrix(fj) %*% rep(1/ni, ni)) + rep(1/ni, ni) %*% t(pj))^2/p1j) tauik <- sum((pik - (fi %*% t(pk)) - t(as.matrix(fk) %*% rep(1/ni, ni)) + rep(1/ni, ni) %*% t(pk))^2/p1k) khjk <- (1/ni) * sum((pjk - (fj %*% t(pk)) - t(fk %*% t(pj)) + pj %*% t(pk))^2/p2jk) khin3try <- sum((p3 - (pij %o% (pk)) - aperm(pik %o% pj, c(1, 3, 2)) - aperm(pjk %o% rep(1/ni, ni), c(3, 1, 2)) + fi %o% pj %o% pk + rep(1/ni, ni) %o% fj %o% pk + rep(1/ni, ni) %o% pj %o% fk - rep(1/ni, ni) %o% pj %o% pk)^2/p1jk) ikhiI <- khiI/devt ikhiJ <- khiJ/devt ikhiK <- khiK/devt itauij <- tauij/devt itauik <- tauik/devt ikhjk <- khjk/devt khin3 <- tau3 - tauij - tauik - khjk - khiI - khiJ - khiK ikhin3 <- khin3/devt nom <- c("I", "J", "K", "IJ", "IK", "JK", "IJK", "M") dres <- (ni - 1) * (nj - 1) * (nk - 1) di <- (ni - 1) dj <- (nj - 1) dk <- (nk - 1) dij <- (ni - 1) * (nj - 1) dik <- (ni - 1) * (nk - 1) djk <- (nj - 1) * (nk - 1) if ((pi == fi) && (pj == fj) && (pk == fk)) { dtot <- dij + dik + djk + dres di <- 0 dj <- 0 dk <- 0 } else { dtot <- ni * nj * nk - 1 } Ci <- (n - 1) * (ni - 1) * ikhiI Cj <- (n - 1) * (ni - 1) * ikhiJ Ck <- (n - 1) * (ni - 1) * ikhiK Cij <- (n - 1) * (ni - 1) * itauij Cik <- (n - 1) * (ni - 1) * itauik Cjk <- (n - 1) * (ni - 1) * ikhjk Cijk <- (n - 1) * (ni - 1) * ikhin3 CM <- (n - 1) * (ni - 1) * itau3 x <- c(khiI, khiJ, khiK, tauij, tauik, khjk, khin3, tau3) y <- (100 * x)/tau3 zz <- c(ikhiI, ikhiJ, ikhiK, itauij, itauik, ikhjk, ikhin3, itau3) zz2 <- c(Ci, Cj, Ck, Cij, Cik, Cjk, Cijk, CM) zz3 <- c(di, dj, dk, dij, dik, djk, dres, dtot) pvalue = 1 - pchisq(zz2, zz3) z <- rbind(x, zz, y, zz2, zz3, pvalue) nomr <- c("Numerator ", "Index", "% of Inertia", "C-statistic", "df", "p-value") dimnames(z) <- list(nomr, nom) z = round(z, digits = digits) list(z = z) } --- function search by body --- Function tau3scen1 in namespace chi2x3way 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 See ‘/data/gannet/ripley/R/packages/tests-LENGTH1/chi2x3way.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 1:08.52, 37.34 + 6.20