Running 'betabin.R' [3s/4s]
  Comparing 'betabin.Rout' to 'betabin.Rout.save' ... OK
  Running 'discrim.R' [2s/3s]
  Comparing 'discrim.Rout' to 'discrim.Rout.save' ... OK
  Running 'test-all.R' [10s/12s]
  Running 'testdouble.R' [3s/4s]
  Running 'twoAC.R' [3s/4s]
Running the tests in 'tests/twoAC.R' failed.
Complete output:
  > library(sensR)
  > 
  > ## Testing border line cases:
  > twoAC(c(5, 0, 15))
  Results for the 2-AC protocol with data c(5, 0, 15):
          Estimate Std. Error
  tau       0.0000         NA
  d.prime   0.9539         NA
  
  Use profile and confint methods to get confidence interval
  
  Significance test:
   Likelihood root statistic = 2.287737 p-value = 0.022153 
   Alternative hypothesis: d-prime is different from 0 
  > twoAC(c(5, 0, 15), stat = "Wald")
  Results for the 2-AC protocol with data c(5, 0, 15):
          Estimate Std. Error
  tau       0.0000         NA
  d.prime   0.9539         NA
  
  Use profile and confint methods to get confidence interval
  
  Significance test not available - try with the likelihood statistic
  > twoAC(c(0, 5, 15))
  Results for the 2-AC protocol with data c(0, 5, 15):
          Estimate Std. Error
  tau           NA         NA
  d.prime      Inf         NA
  
  Use profile and confint methods to get confidence interval
  
  Significance test:
   Likelihood root statistic = 4.560089 p-value = 5.1132e-06 
   Alternative hypothesis: d-prime is different from 0 
  > twoAC(c(5, 15, 0))
  Results for the 2-AC protocol with data c(5, 15, 0):
          Estimate Std. Error
  tau           NA         NA
  d.prime     -Inf         NA
  
  Use profile and confint methods to get confidence interval
  
  Significance test:
   Likelihood root statistic = -2.632769 p-value = 0.0084692 
   Alternative hypothesis: d-prime is different from 0 
  > twoAC(c(5, 0, 0))
  Results for the 2-AC protocol with data c(5, 0, 0):
          Estimate Std. Error
  tau            0         NA
  d.prime     -Inf         NA
  
  Use profile and confint methods to get confidence interval
  
  Significance test:
   Likelihood root statistic = -2.632769 p-value = 0.0084692 
   Alternative hypothesis: d-prime is different from 0 
  > twoAC(c(0, 0, 15))
  Results for the 2-AC protocol with data c(0, 0, 15):
          Estimate Std. Error
  tau            0         NA
  d.prime      Inf         NA
  
  Use profile and confint methods to get confidence interval
  
  Significance test:
   Likelihood root statistic = 4.560089 p-value = 5.1132e-06 
   Alternative hypothesis: d-prime is different from 0 
  > twoAC(c(0, 5, 15), stat = "Wald")
  Results for the 2-AC protocol with data c(0, 5, 15):
          Estimate Std. Error
  tau           NA         NA
  d.prime      Inf         NA
  
  Use profile and confint methods to get confidence interval
  
  Significance test not available - try with the likelihood statistic
  > twoAC(c(5, 15, 0), stat = "Wald")
  Results for the 2-AC protocol with data c(5, 15, 0):
          Estimate Std. Error
  tau           NA         NA
  d.prime     -Inf         NA
  
  Use profile and confint methods to get confidence interval
  
  Significance test not available - try with the likelihood statistic
  > twoAC(c(5, 0, 0), stat = "Wald")
  Results for the 2-AC protocol with data c(5, 0, 0):
          Estimate Std. Error
  tau            0         NA
  d.prime     -Inf         NA
  
  Use profile and confint methods to get confidence interval
  
  Significance test not available - try with the likelihood statistic
  > twoAC(c(0, 0, 15), stat = "Wald")
  Results for the 2-AC protocol with data c(0, 0, 15):
          Estimate Std. Error
  tau            0         NA
  d.prime      Inf         NA
  
  Use profile and confint methods to get confidence interval
  
  Significance test not available - try with the likelihood statistic
  > 
  > ## Testing twoAC functions:
  > (fm1 <- twoAC(c(2, 2, 6)))
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  sensR
   --- call from context --- 
  estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
   --- call from argument --- 
  if (class(vcov) != "try-error") {
      makeWarn <- TRUE
      res$coefficients[, 2] <- sqrt(diag(vcov))
      res$vcov <- vcov
  }
   --- R stacktrace ---
  where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
  where 2: twoAC(c(2, 2, 6))
  
   --- value of length: 2 type: logical ---
  [1] TRUE TRUE
   --- function from context --- 
  function (data, vcov = TRUE, warn = TRUE) 
  {
      vcov <- as.logical(vcov)
      stopifnot(is.logical(vcov))
      nll <- function(par) {
          tau <- par[1]
          d.prime <- par[2]
          p1 <- pnorm(-tau, d.prime, sqrt(2))
          p12 <- pnorm(tau, d.prime, sqrt(2))
          prob <- c(p1, p12 - p1, 1 - p12)
          prob[prob <= 0] <- 1
          -sum(data * log(prob))
      }
      x <- data
      if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
          tau <- 0
          d.prime <- -Inf
      }
      else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
          tau <- NA
          d.prime <- NA
      }
      else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
          tau <- 0
          d.prime <- Inf
      }
      else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
          d.prime <- -Inf
          tau <- NA
      }
      else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
          d.prime <- Inf
          tau <- NA
      }
      else {
          prob <- data/sum(data)
          gamma <- cumsum(prob)[-3]
          z <- qnorm(gamma) * sqrt(2)
          tau <- (z[2] - z[1])/2
          d.prime <- -z[1] - tau
      }
      prob <- data/sum(data)
      prob[prob <= 0] <- 1
      logLikMax <- sum(data * log(prob))
      coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"), 
          c("Estimate", "Std. Error")))
      coef[, 1] <- c(tau, d.prime)
      res <- list(coefficients = coef, data = data, logLik = logLikMax)
      if (vcov) {
          makeWarn <- TRUE
          if (all(is.finite(coef[, 1])) && tau > 0) {
              makeWarn <- FALSE
              hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson", 
                  method.args = list())
              vcov <- try(solve(hess), silent = TRUE)
              if (class(vcov) != "try-error") {
                  makeWarn <- TRUE
                  res$coefficients[, 2] <- sqrt(diag(vcov))
                  res$vcov <- vcov
              }
          }
          if (warn && makeWarn) 
              warning("vcov and standard errors are not available", 
                  call. = FALSE)
      }
      return(res)
  }
  <bytecode: 0x9288690>
  <environment: namespace:sensR>
   --- function search by body ---
  Function estimate.2AC in namespace sensR has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Error in if (class(vcov) != "try-error") { : the condition has length > 1
  Calls: twoAC -> estimate.2AC
  Execution halted