CRAN Package Check Results for Package SensMixed

Last updated on 2019-12-11 12:48:57 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 2.1-0 22.32 202.29 224.61 ERROR
r-devel-linux-x86_64-debian-gcc 2.1-0 17.52 299.05 316.57 OK
r-devel-linux-x86_64-fedora-clang 2.1-0 499.10 OK
r-devel-linux-x86_64-fedora-gcc 2.1-0 512.65 OK
r-devel-windows-ix86+x86_64 2.1-0 39.00 184.00 223.00 OK --no-examples --no-tests --no-vignettes
r-devel-windows-ix86+x86_64-gcc8 2.1-0 52.00 167.00 219.00 OK --no-examples --no-tests --no-vignettes
r-patched-linux-x86_64 2.1-0 18.25 349.81 368.06 OK
r-patched-solaris-x86 2.1-0 595.50 OK
r-release-linux-x86_64 2.1-0 19.48 354.10 373.58 OK
r-release-windows-ix86+x86_64 2.1-0 38.00 124.00 162.00 OK --no-examples --no-tests --no-vignettes
r-release-osx-x86_64 2.1-0 OK
r-oldrel-windows-ix86+x86_64 2.1-0 23.00 177.00 200.00 OK --no-examples --no-tests --no-vignettes
r-oldrel-osx-x86_64 2.1-0 OK

Check Details

Version: 2.1-0
Check: examples
Result: ERROR
    Running examples in 'SensMixed-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: TVbo
    > ### Title: TV dataset
    > ### Aliases: TVbo
    > ### Keywords: datasets
    >
    > ### ** Examples
    >
    > ## import SensMixed package
    > library(SensMixed)
    >
    > ## convert some variables to factors in TVbo
    > TVbo <- convertToFactors(TVbo, c("Assessor", "Repeat", "Picture"))
    >
    > ## run automated selection process
    > res <- sensmixed(c("Coloursaturation", "Colourbalance"),
    + prod_effects = c("TVset", "Picture"),
    + assessor="Assessor", data=TVbo, MAM=FALSE)
    
     |
     | | 0%Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
     Model failed to converge with max|grad| = 0.00592903 (tol = 0.002, component 1)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SensMixed
     --- call from context ---
    calcSatterthMultDF(rho, L)
     --- call from argument ---
    if (class(g) == "numeric") {
     lapply(1:length(theopt), function(i) array(g[i], dim = dim(vcov.final)))
    } else {
     lapply(1:length(theopt), function(i) array(g[, i], dim = dim(vcov.final)))
    }
     --- R stacktrace ---
    where 1: calcSatterthMultDF(rho, L)
    where 2: calcSatt(rho, Lc)
    where 3: calcFpvalueSS(Lc, rho, ddf, type)
    where 4: calcFpvalueMAIN(term = tt, L = L, rho = rho, ddf = ddf, type = type)
    where 5: FUN(X[[i]], ...)
    where 6: lapply(test.terms, function(tt) calcFpvalueMAIN(term = tt, L = L,
     rho = rho, ddf = ddf, type = type))
    where 7: stepFun(model = model, ddf = ddf, type = type, alpha.random = alpha.random,
     alpha.fixed = alpha.fixed, reduce.fixed = reduce.fixed, reduce.random = reduce.random,
     fixed.calc = fixed.calc, lsmeans.calc = lsmeans.calc, difflsmeans.calc = difflsmeans.calc,
     test.effs = test.effs, keep.effs = keep.effs, change.contr = TRUE)
    where 8: step(m, reduce.fixed = FALSE, reduce.random = reduce.random,
     alpha.random = alpha.random, alpha.fixed = alpha.fixed, lsmeans.calc = TRUE,
     difflsmeans.calc = calc_post_hoc, keep.effs = keep.effs)
    where 9: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
    where 10: suppressMessages(st <- step(m, reduce.fixed = FALSE, reduce.random = reduce.random,
     alpha.random = alpha.random, alpha.fixed = alpha.fixed, lsmeans.calc = TRUE,
     difflsmeans.calc = calc_post_hoc, keep.effs = keep.effs))
    where 11: .fun(piece, ...)
    where 12: (function (i)
    {
     piece <- pieces[[i]]
     if (.inform) {
     res <- try(.fun(piece, ...))
     if (inherits(res, "try-error")) {
     piece <- paste(utils::capture.output(print(piece)),
     collapse = "\n")
     stop("with piece ", i, ": \n", piece, call. = FALSE)
     }
     }
     else {
     res <- .fun(piece, ...)
     }
     progress$step()
     res
    })(1L)
    where 13: loop_apply(n, do.ply)
    where 14: llply(attributes, .stepAllAttrNoMAM, product_structure = product_structure,
     error_structure = error_structure, data = data, prod_effects = prod_effects,
     random = random, reduce.random = rmatch(control, "reduce.random"),
     alpha.random = rmatch(control, "alpha.random"), alpha.fixed = rmatch(control,
     "alpha.fixed"), calc_post_hoc = rmatch(control, "calc_post_hoc"),
     keep.effs = keep.effs, .progress = "text")
    where 15: sensmixedFun(attributes = attributes, prod_effects = prod_effects,
     assessor = assessor, replication = replication, data = data,
     product_structure = product_structure, error_structure = error_structure,
     MAM = MAM, control = control)
    where 16: sensmixed(c("Coloursaturation", "Colourbalance"), prod_effects = c("TVset",
     "Picture"), assessor = "Assessor", data = TVbo, MAM = FALSE)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (rho, Lc)
    {
     vcov.final <- as.matrix(vcov(rho$model))
     if (is.vector(Lc))
     C.theta.optim <- as.matrix(t(Lc) %*% vcov.final %*% Lc)
     else C.theta.optim <- as.matrix(Lc %*% vcov.final %*% t(Lc))
     invC.theta <- tryCatch({
     solve(C.theta.optim)
     }, error = function(e) {
     NULL
     })
     if (is.null(invC.theta))
     return(list(denom = 0, Fstat = NA, pvalue = NA, ndf = NA,
     ss = NA, ms = NA))
     q <- qr(C.theta.optim)$rank
     F.stat <- (t(Lc %*% rho$fixEffs) %*% invC.theta %*% (Lc %*%
     rho$fixEffs))/q
     svdec <- eigen(C.theta.optim)
     PL <- t(svdec$vectors) %*% Lc
     vss2 <- vcovTheta(rho$model)
     theopt <- c(rho$thopt, rho$sigma)
     g <- mygrad(function(x) vss2(x), theopt)
     mat.grad <- if (class(g) == "numeric") {
     lapply(1:length(theopt), function(i) array(g[i], dim = dim(vcov.final)))
     }
     else {
     lapply(1:length(theopt), function(i) array(g[, i], dim = dim(vcov.final)))
     }
     nu.m.fun <- function(m) {
     den.nu <- unlist(lapply(1:length(mat.grad), function(i) as.matrix(t(PL[m,
     ]) %*% mat.grad[[i]] %*% PL[m, ])))
     2 * (svdec$values[m])^2/(t(den.nu) %*% rho$A %*% den.nu)
     }
     nu.m <- unlist(lapply(1:length(svdec$values), nu.m.fun))
     nu.m[which(abs(2 - nu.m) < 1e-05)] <- 2.00001
     E <- sum((nu.m/(nu.m - 2)) * as.numeric(nu.m > 2))
     nu.F <- 2 * E * as.numeric(E > q)/(E - q)
     pvalueF <- pf(F.stat, qr(Lc)$rank, nu.F, lower.tail = FALSE)
     if (is.na(F.stat))
     ms <- ss <- NA
     else {
     ms <- F.stat * rho$sigma^2
     ss <- ms * q
     }
     return(list(ss = ss, ms = ms, denom = nu.F, Fstat = F.stat,
     pvalue = pvalueF, ndf = q))
    }
    <bytecode: 0x11e0f928>
    <environment: namespace:SensMixed>
     --- function search by body ---
    Function calcSatterthMultDF in namespace SensMixed has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(g) == "numeric") { : the condition has length > 1
    Calls: sensmixed ... calcFpvalueMAIN -> calcFpvalueSS -> calcSatt -> calcSatterthMultDF
    
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 2.1-0
Check: tests
Result: ERROR
     Running 'bugBO.R' [4s/5s]
     Running 'bugKEEPdprime.R' [4s/6s]
     Running 'testBugResiduals.R' [9s/12s]
     Running 'testDprimes.R' [10s/12s]
     Running 'testKEEPeffs.R' [32s/35s]
     Running 'testRep.R' [4s/5s]
    Running the tests in 'tests/testBugResiduals.R' failed.
    Complete output:
     > testOST <- FALSE
     >
     > library(SensMixed)
     > load(system.file("testdata","bugResiddat.RData",package="SensMixed"))
     > load(system.file("testdata","bb.RData",package="SensMixed"))
     > load(system.file("testdata","ost.RData",package="SensMixed"))
     >
     > response <- c("liking")
     > fixed <- list(Product = c("Sugar", "Acid"))
     > random <- c("consumer")
     > facs <- c("consumer", "Sugar", "Acid")
     >
     > res <- conjoint(structure = 3, dat, response, fixed, random, facs)
     [1] "Calculating liking ..."
     Number of levels for interaction consumer:Sugar:Acid is more or equal to the number of observations in data
    
     Number of levels for interaction consumer:Sugar:Acid is more or equal to the number of observations in data
    
     boundary (singular) fit: see ?isSingular
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     SensMixed
     --- call from context ---
     calcSatterthMultDF(rho, L)
     --- call from argument ---
     if (class(g) == "numeric") {
     lapply(1:length(theopt), function(i) array(g[i], dim = dim(vcov.final)))
     } else {
     lapply(1:length(theopt), function(i) array(g[, i], dim = dim(vcov.final)))
     }
     --- R stacktrace ---
     where 1: calcSatterthMultDF(rho, L)
     where 2: calcSatt(rho, Lc)
     where 3: calcFpvalueSS(Lc, rho, ddf, type)
     where 4: calcFpvalueMAIN(term = tt, L = L, rho = rho, ddf = ddf, type = type)
     where 5: FUN(X[[i]], ...)
     where 6: lapply(test.terms, function(tt) calcFpvalueMAIN(term = tt, L = L,
     rho = rho, ddf = ddf, type = type))
     where 7: stepFun(model = model, ddf = ddf, type = type, alpha.random = alpha.random,
     alpha.fixed = alpha.fixed, reduce.fixed = reduce.fixed, reduce.random = reduce.random,
     fixed.calc = fixed.calc, lsmeans.calc = lsmeans.calc, difflsmeans.calc = difflsmeans.calc,
     test.effs = test.effs, keep.effs = keep.effs, change.contr = TRUE)
     where 8: step(model, reduce.fixed = isFixReduce, reduce.random = isRandReduce,
     alpha.random = alpha.random, alpha.fixed = alpha.fixed)
     where 9: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
     where 10: suppressMessages(t <- step(model, reduce.fixed = isFixReduce,
     reduce.random = isRandReduce, alpha.random = alpha.random,
     alpha.fixed = alpha.fixed))
     where 11: conjointFun(structure = structure, data = data, response = response,
     fixed = fixed, random = random, facs = facs, corr = FALSE,
     alpha.random = alpha.random, alpha.fixed = alpha.fixed)
     where 12: conjoint(structure = 3, dat, response, fixed, random, facs)
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (rho, Lc)
     {
     vcov.final <- as.matrix(vcov(rho$model))
     if (is.vector(Lc))
     C.theta.optim <- as.matrix(t(Lc) %*% vcov.final %*% Lc)
     else C.theta.optim <- as.matrix(Lc %*% vcov.final %*% t(Lc))
     invC.theta <- tryCatch({
     solve(C.theta.optim)
     }, error = function(e) {
     NULL
     })
     if (is.null(invC.theta))
     return(list(denom = 0, Fstat = NA, pvalue = NA, ndf = NA,
     ss = NA, ms = NA))
     q <- qr(C.theta.optim)$rank
     F.stat <- (t(Lc %*% rho$fixEffs) %*% invC.theta %*% (Lc %*%
     rho$fixEffs))/q
     svdec <- eigen(C.theta.optim)
     PL <- t(svdec$vectors) %*% Lc
     vss2 <- vcovTheta(rho$model)
     theopt <- c(rho$thopt, rho$sigma)
     g <- mygrad(function(x) vss2(x), theopt)
     mat.grad <- if (class(g) == "numeric") {
     lapply(1:length(theopt), function(i) array(g[i], dim = dim(vcov.final)))
     }
     else {
     lapply(1:length(theopt), function(i) array(g[, i], dim = dim(vcov.final)))
     }
     nu.m.fun <- function(m) {
     den.nu <- unlist(lapply(1:length(mat.grad), function(i) as.matrix(t(PL[m,
     ]) %*% mat.grad[[i]] %*% PL[m, ])))
     2 * (svdec$values[m])^2/(t(den.nu) %*% rho$A %*% den.nu)
     }
     nu.m <- unlist(lapply(1:length(svdec$values), nu.m.fun))
     nu.m[which(abs(2 - nu.m) < 1e-05)] <- 2.00001
     E <- sum((nu.m/(nu.m - 2)) * as.numeric(nu.m > 2))
     nu.F <- 2 * E * as.numeric(E > q)/(E - q)
     pvalueF <- pf(F.stat, qr(Lc)$rank, nu.F, lower.tail = FALSE)
     if (is.na(F.stat))
     ms <- ss <- NA
     else {
     ms <- F.stat * rho$sigma^2
     ss <- ms * q
     }
     return(list(ss = ss, ms = ms, denom = nu.F, Fstat = F.stat,
     pvalue = pvalueF, ndf = q))
     }
     <bytecode: 0xe250c08>
     <environment: namespace:SensMixed>
     --- function search by body ---
     Function calcSatterthMultDF in namespace SensMixed has this body.
     ----------- END OF FAILURE REPORT --------------
     Error in if (class(g) == "numeric") { : the condition has length > 1
     Calls: conjoint ... calcFpvalueMAIN -> calcFpvalueSS -> calcSatt -> calcSatterthMultDF
     Execution halted
    Running the tests in 'tests/testDprimes.R' failed.
    Complete output:
     > require(SensMixed)
     Loading required package: SensMixed
     > load(system.file("testdata","sensBObalanc.RData",package="SensMixed"))
     > load(system.file("testdata","sensBO.RData",package="SensMixed"))
     > testBO <- FALSE
     > ###########################################
     > ## check for TVbo without replication
     > ###########################################
     >
     >
     >
     > TVbo <- convertToFactors(TVbo, c("Assessor", "Repeat", "Picture"))
     > result <- sensmixed(c("Noise", "Elasticeffect"),
     + prod_effects = c("TVset", "Picture"),
     + assessor = "Assessor", data = TVbo,
     + control = list(calc_post_hoc = TRUE), MAM = FALSE)
    
     |
     | | 0% ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     SensMixed
     --- call from context ---
     calcSatterthMultDF(rho, L)
     --- call from argument ---
     if (class(g) == "numeric") {
     lapply(1:length(theopt), function(i) array(g[i], dim = dim(vcov.final)))
     } else {
     lapply(1:length(theopt), function(i) array(g[, i], dim = dim(vcov.final)))
     }
     --- R stacktrace ---
     where 1: calcSatterthMultDF(rho, L)
     where 2: calcSatt(rho, Lc)
     where 3: calcFpvalueSS(Lc, rho, ddf, type)
     where 4: calcFpvalueMAIN(term = tt, L = L, rho = rho, ddf = ddf, type = type)
     where 5: FUN(X[[i]], ...)
     where 6: lapply(test.terms, function(tt) calcFpvalueMAIN(term = tt, L = L,
     rho = rho, ddf = ddf, type = type))
     where 7: stepFun(model = model, ddf = ddf, type = type, alpha.random = alpha.random,
     alpha.fixed = alpha.fixed, reduce.fixed = reduce.fixed, reduce.random = reduce.random,
     fixed.calc = fixed.calc, lsmeans.calc = lsmeans.calc, difflsmeans.calc = difflsmeans.calc,
     test.effs = test.effs, keep.effs = keep.effs, change.contr = TRUE)
     where 8: step(m, reduce.fixed = FALSE, reduce.random = reduce.random,
     alpha.random = alpha.random, alpha.fixed = alpha.fixed, lsmeans.calc = TRUE,
     difflsmeans.calc = calc_post_hoc, keep.effs = keep.effs)
     where 9: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
     where 10: suppressMessages(st <- step(m, reduce.fixed = FALSE, reduce.random = reduce.random,
     alpha.random = alpha.random, alpha.fixed = alpha.fixed, lsmeans.calc = TRUE,
     difflsmeans.calc = calc_post_hoc, keep.effs = keep.effs))
     where 11: .fun(piece, ...)
     where 12: (function (i)
     {
     piece <- pieces[[i]]
     if (.inform) {
     res <- try(.fun(piece, ...))
     if (inherits(res, "try-error")) {
     piece <- paste(utils::capture.output(print(piece)),
     collapse = "\n")
     stop("with piece ", i, ": \n", piece, call. = FALSE)
     }
     }
     else {
     res <- .fun(piece, ...)
     }
     progress$step()
     res
     })(1L)
     where 13: loop_apply(n, do.ply)
     where 14: llply(attributes, .stepAllAttrNoMAM, product_structure = product_structure,
     error_structure = error_structure, data = data, prod_effects = prod_effects,
     random = random, reduce.random = rmatch(control, "reduce.random"),
     alpha.random = rmatch(control, "alpha.random"), alpha.fixed = rmatch(control,
     "alpha.fixed"), calc_post_hoc = rmatch(control, "calc_post_hoc"),
     keep.effs = keep.effs, .progress = "text")
     where 15: sensmixedFun(attributes = attributes, prod_effects = prod_effects,
     assessor = assessor, replication = replication, data = data,
     product_structure = product_structure, error_structure = error_structure,
     MAM = MAM, control = control)
     where 16: sensmixed(c("Noise", "Elasticeffect"), prod_effects = c("TVset",
     "Picture"), assessor = "Assessor", data = TVbo, control = list(calc_post_hoc = TRUE),
     MAM = FALSE)
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (rho, Lc)
     {
     vcov.final <- as.matrix(vcov(rho$model))
     if (is.vector(Lc))
     C.theta.optim <- as.matrix(t(Lc) %*% vcov.final %*% Lc)
     else C.theta.optim <- as.matrix(Lc %*% vcov.final %*% t(Lc))
     invC.theta <- tryCatch({
     solve(C.theta.optim)
     }, error = function(e) {
     NULL
     })
     if (is.null(invC.theta))
     return(list(denom = 0, Fstat = NA, pvalue = NA, ndf = NA,
     ss = NA, ms = NA))
     q <- qr(C.theta.optim)$rank
     F.stat <- (t(Lc %*% rho$fixEffs) %*% invC.theta %*% (Lc %*%
     rho$fixEffs))/q
     svdec <- eigen(C.theta.optim)
     PL <- t(svdec$vectors) %*% Lc
     vss2 <- vcovTheta(rho$model)
     theopt <- c(rho$thopt, rho$sigma)
     g <- mygrad(function(x) vss2(x), theopt)
     mat.grad <- if (class(g) == "numeric") {
     lapply(1:length(theopt), function(i) array(g[i], dim = dim(vcov.final)))
     }
     else {
     lapply(1:length(theopt), function(i) array(g[, i], dim = dim(vcov.final)))
     }
     nu.m.fun <- function(m) {
     den.nu <- unlist(lapply(1:length(mat.grad), function(i) as.matrix(t(PL[m,
     ]) %*% mat.grad[[i]] %*% PL[m, ])))
     2 * (svdec$values[m])^2/(t(den.nu) %*% rho$A %*% den.nu)
     }
     nu.m <- unlist(lapply(1:length(svdec$values), nu.m.fun))
     nu.m[which(abs(2 - nu.m) < 1e-05)] <- 2.00001
     E <- sum((nu.m/(nu.m - 2)) * as.numeric(nu.m > 2))
     nu.F <- 2 * E * as.numeric(E > q)/(E - q)
     pvalueF <- pf(F.stat, qr(Lc)$rank, nu.F, lower.tail = FALSE)
     if (is.na(F.stat))
     ms <- ss <- NA
     else {
     ms <- F.stat * rho$sigma^2
     ss <- ms * q
     }
     return(list(ss = ss, ms = ms, denom = nu.F, Fstat = F.stat,
     pvalue = pvalueF, ndf = q))
     }
     <bytecode: 0x1047f808>
     <environment: namespace:SensMixed>
     --- function search by body ---
     Function calcSatterthMultDF in namespace SensMixed has this body.
     ----------- END OF FAILURE REPORT --------------
     Error in if (class(g) == "numeric") { : the condition has length > 1
     Calls: sensmixed ... calcFpvalueMAIN -> calcFpvalueSS -> calcSatt -> calcSatterthMultDF
    
     Execution halted
    Running the tests in 'tests/testKEEPeffs.R' failed.
    Complete output:
     > require(SensMixed)
     Loading required package: SensMixed
     >
     > #convert some variables to factors in TVbo
     > TVbo <- convertToFactors(TVbo, c("Assessor", "Repeat", "Picture"))
     >
     > res <- sensmixed(c("Coloursaturation", "Colourbalance"),
     + prod_effects = c("TVset", "Picture"), replication="Repeat",
     + assessor="Assessor", data=TVbo,
     + control = list(keep.effs = "Assessor"), MAM = FALSE)
    
    
     |
     | | 0%
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     SensMixed
     --- call from context ---
     calcSatterthMultDF(rho, L)
     --- call from argument ---
     if (class(g) == "numeric") {
     lapply(1:length(theopt), function(i) array(g[i], dim = dim(vcov.final)))
     } else {
     lapply(1:length(theopt), function(i) array(g[, i], dim = dim(vcov.final)))
     }
     --- R stacktrace ---
     where 1: calcSatterthMultDF(rho, L)
     where 2: calcSatt(rho, Lc)
     where 3: calcFpvalueSS(Lc, rho, ddf, type)
     where 4: calcFpvalueMAIN(term = tt, L = L, rho = rho, ddf = ddf, type = type)
     where 5: FUN(X[[i]], ...)
     where 6: lapply(test.terms, function(tt) calcFpvalueMAIN(term = tt, L = L,
     rho = rho, ddf = ddf, type = type))
     where 7: stepFun(model = model, ddf = ddf, type = type, alpha.random = alpha.random,
     alpha.fixed = alpha.fixed, reduce.fixed = reduce.fixed, reduce.random = reduce.random,
     fixed.calc = fixed.calc, lsmeans.calc = lsmeans.calc, difflsmeans.calc = difflsmeans.calc,
     test.effs = test.effs, keep.effs = keep.effs, change.contr = TRUE)
     where 8: step(m, reduce.fixed = FALSE, reduce.random = reduce.random,
     alpha.random = alpha.random, alpha.fixed = alpha.fixed, lsmeans.calc = TRUE,
     difflsmeans.calc = calc_post_hoc, keep.effs = keep.effs)
     where 9: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
     where 10: suppressMessages(st <- step(m, reduce.fixed = FALSE, reduce.random = reduce.random,
     alpha.random = alpha.random, alpha.fixed = alpha.fixed, lsmeans.calc = TRUE,
     difflsmeans.calc = calc_post_hoc, keep.effs = keep.effs))
     where 11: .fun(piece, ...)
     where 12: (function (i)
     {
     piece <- pieces[[i]]
     if (.inform) {
     res <- try(.fun(piece, ...))
     if (inherits(res, "try-error")) {
     piece <- paste(utils::capture.output(print(piece)),
     collapse = "\n")
     stop("with piece ", i, ": \n", piece, call. = FALSE)
     }
     }
     else {
     res <- .fun(piece, ...)
     }
     progress$step()
     res
     })(1L)
     where 13: loop_apply(n, do.ply)
     where 14: llply(attributes, .stepAllAttrNoMAM, product_structure = product_structure,
     error_structure = error_structure, data = data, prod_effects = prod_effects,
     random = random, reduce.random = rmatch(control, "reduce.random"),
     alpha.random = rmatch(control, "alpha.random"), alpha.fixed = rmatch(control,
     "alpha.fixed"), calc_post_hoc = rmatch(control, "calc_post_hoc"),
     keep.effs = keep.effs, .progress = "text")
     where 15: sensmixedFun(attributes = attributes, prod_effects = prod_effects,
     assessor = assessor, replication = replication, data = data,
     product_structure = product_structure, error_structure = error_structure,
     MAM = MAM, control = control)
     where 16: sensmixed(c("Coloursaturation", "Colourbalance"), prod_effects = c("TVset",
     "Picture"), replication = "Repeat", assessor = "Assessor",
     data = TVbo, control = list(keep.effs = "Assessor"), MAM = FALSE)
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (rho, Lc)
     {
     vcov.final <- as.matrix(vcov(rho$model))
     if (is.vector(Lc))
     C.theta.optim <- as.matrix(t(Lc) %*% vcov.final %*% Lc)
     else C.theta.optim <- as.matrix(Lc %*% vcov.final %*% t(Lc))
     invC.theta <- tryCatch({
     solve(C.theta.optim)
     }, error = function(e) {
     NULL
     })
     if (is.null(invC.theta))
     return(list(denom = 0, Fstat = NA, pvalue = NA, ndf = NA,
     ss = NA, ms = NA))
     q <- qr(C.theta.optim)$rank
     F.stat <- (t(Lc %*% rho$fixEffs) %*% invC.theta %*% (Lc %*%
     rho$fixEffs))/q
     svdec <- eigen(C.theta.optim)
     PL <- t(svdec$vectors) %*% Lc
     vss2 <- vcovTheta(rho$model)
     theopt <- c(rho$thopt, rho$sigma)
     g <- mygrad(function(x) vss2(x), theopt)
     mat.grad <- if (class(g) == "numeric") {
     lapply(1:length(theopt), function(i) array(g[i], dim = dim(vcov.final)))
     }
     else {
     lapply(1:length(theopt), function(i) array(g[, i], dim = dim(vcov.final)))
     }
     nu.m.fun <- function(m) {
     den.nu <- unlist(lapply(1:length(mat.grad), function(i) as.matrix(t(PL[m,
     ]) %*% mat.grad[[i]] %*% PL[m, ])))
     2 * (svdec$values[m])^2/(t(den.nu) %*% rho$A %*% den.nu)
     }
     nu.m <- unlist(lapply(1:length(svdec$values), nu.m.fun))
     nu.m[which(abs(2 - nu.m) < 1e-05)] <- 2.00001
     E <- sum((nu.m/(nu.m - 2)) * as.numeric(nu.m > 2))
     nu.F <- 2 * E * as.numeric(E > q)/(E - q)
     pvalueF <- pf(F.stat, qr(Lc)$rank, nu.F, lower.tail = FALSE)
     if (is.na(F.stat))
     ms <- ss <- NA
     else {
     ms <- F.stat * rho$sigma^2
     ss <- ms * q
     }
     return(list(ss = ss, ms = ms, denom = nu.F, Fstat = F.stat,
     pvalue = pvalueF, ndf = q))
     }
     <bytecode: 0x10493030>
     <environment: namespace:SensMixed>
     --- function search by body ---
     Function calcSatterthMultDF in namespace SensMixed has this body.
     ----------- END OF FAILURE REPORT --------------
     Error in if (class(g) == "numeric") { : the condition has length > 1
     Calls: sensmixed ... calcFpvalueMAIN -> calcFpvalueSS -> calcSatt -> calcSatterthMultDF
     In addition: Warning messages:
     1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
     Model failed to converge with max|grad| = 0.00767249 (tol = 0.002, component 1)
     2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
     Model failed to converge with max|grad| = 0.00296669 (tol = 0.002, component 1)
     3: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
     Model failed to converge with max|grad| = 0.0227178 (tol = 0.002, component 1)
     4: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
     unable to evaluate scaled gradient
     5: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
     Model failed to converge: degenerate Hessian with 1 negative eigenvalues
     6: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
     Model failed to converge with max|grad| = 0.00329232 (tol = 0.002, component 1)
    
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang