Running 'test.connectivity_estimation.R' [1s/1s]
  Running 'test.connectivity_estimation.beta.prior.R' [1s/1s]
  Running 'test.connectivity_estimation.distributions.R' [1s/2s]
  Running 'test.connectivity_estimation.multinomial.R' [7s/9s]
  Running 'test.connectivity_estimation.multiple.R' [11s/13s]
  Running 'test.dpr_model.R' [1s/2s]
  Running 'test.laplacianConnMat.R' [0s/1s]
  Running 'test.marked.egg.fraction.R' [0s/1s]
  Running 'test.optimalSplitConnMat.R' [1s/2s]
  Running 'test.retentionStats.R' [0s/1s]
Running the tests in 'tests/test.dpr_model.R' failed.
Complete output:
  > library(ConnMatTools)
  > data(chile.loco)
  > 
  > # Get appropriate collapse slope
  > # critical.FLEP=0.2 is just an example
  > slope <- settlerRecruitSlopeCorrection(chile.loco,critical.FLEP=0.2)
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  ConnMatTools
   --- call from context --- 
  settlerRecruitSlopeCorrection(chile.loco, critical.FLEP = 0.2)
   --- call from argument --- 
  if (class(conn.mat) != "matrix") stop("Input conn.mat must be a matrix.")
   --- R stacktrace ---
  where 1: settlerRecruitSlopeCorrection(chile.loco, critical.FLEP = 0.2)
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (conn.mat, slope = 1, natural.LEP = 1, critical.FLEP = 0.35, 
      use.arpack = TRUE) 
  {
      if (class(conn.mat) != "matrix") 
          stop("Input conn.mat must be a matrix.")
      if (length(natural.LEP) > 1) 
          C = conn.mat %*% (natural.LEP * critical.FLEP)
      else C = conn.mat * (natural.LEP * critical.FLEP)
      if (length(slope) > 1) 
          C = diag(slope) %*% C
      else C = slope * C
      v = eigs(M = C, nev = 1, which = "LM", use.arpack = use.arpack)$values
      return(slope/Mod(v))
  }
  <bytecode: 0x3137ed0>
  <environment: namespace:ConnMatTools>
   --- function search by body ---
  Function settlerRecruitSlopeCorrection in namespace ConnMatTools has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1
Running the tests in 'tests/test.optimalSplitConnMat.R' failed.
Complete output:
  > library(ConnMatTools)
  > data(chile.loco)
  > 
  > num <- prod(dim(chile.loco)) / sum(chile.loco)
  > betas <- betasVectorDefault(n=num,steps=4)
  > chile.loco.split <- optimalSplitConnMat(chile.loco,normalize.cols=FALSE,
  +                                         betas=betas)
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  ConnMatTools
   --- call from context --- 
  optimalSplitConnMat(chile.loco, normalize.cols = FALSE, betas = betas)
   --- call from argument --- 
  if (class(conn.mat) != "matrix") stop("Input conn.mat must be a matrix.")
   --- R stacktrace ---
  where 1: optimalSplitConnMat(chile.loco, normalize.cols = FALSE, betas = betas)
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (conn.mat, normalize.cols = TRUE, make.symmetric = "mean", 
      remove.diagonal = FALSE, cycles = 2, betas = betasVectorDefault(ifelse(normalize.cols, 
          dim(conn.mat)[2], prod(dim(conn.mat))/sum(conn.mat)), 
          steps), steps = 10, ...) 
  {
      if (class(conn.mat) != "matrix") 
          stop("Input conn.mat must be a matrix.")
      pp <- conn.mat
      if (normalize.cols) 
          for (kk in 1:dim(pp)[2]) {
              ss = sum(pp[, kk])
              if (ss > 0) 
                  pp[, kk] = pp[, kk]/ss
          }
      mymax = function(x) {
          ii = x < t(x)
          x[ii] = t(x)[ii]
          return(x)
      }
      pp = switch(make.symmetric, mean = (pp + t(pp))/2, max = mymax(pp), 
          stop("Bad max.symmetric string"))
      if (remove.diagonal) 
          diag(pp) <- 0
      subpops = matrix(NA, nrow = dim(conn.mat)[2], ncol = cycles * 
          length(betas))
      num.subpops = rep(NA, cycles * length(betas))
      qualities = num.subpops
      for (kk in 1:cycles) {
          print(paste("Starting cycle", kk))
          ta = list(1:dim(conn.mat)[2])
          for (ll in 1:length(betas)) {
              beta = betas[ll]
              print(paste("beta =", beta))
              taOld = list()
              while (!setequal(ta, taOld)) {
                  taOld = ta
                  ta = recSplitConnMat(ta, pp, beta, ...)
                  ta = mergeSubpops(ta, pp, beta)
              }
              nn = (kk - 1) * length(betas) + ll
              qualities[nn] = qualitySubpops(ta, conn.mat)
              num.subpops[nn] = length(ta)
              for (mm in 1:length(ta)) subpops[ta[[mm]], nn] = mm
          }
      }
      imin <- function(x) {
          which(min(x) == x)[1]
      }
      best.splits = by(data.frame(quality = qualities, index = 1:length(qualities)), 
          INDICES = num.subpops, FUN = function(d) d[imin(d$quality), 
              ])
      return(list(betas = rep(betas, cycles), subpops = subpops, 
          qualities = qualities, num.subpops = num.subpops, best.splits = best.splits))
  }
  <bytecode: 0x3faba00>
  <environment: namespace:ConnMatTools>
   --- function search by body ---
  Function optimalSplitConnMat in namespace ConnMatTools has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1