Running 'testthat.R' [427s/470s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > test_check("BMhyb")
  Loading required package: BMhyb
  [1] "Now starting analysis"
  [1] "Starting with initial values"
     sigma.sq          mu          SE          bt          vh 
  0.117682960 2.118832288 0.007956494 1.000000000 0.007956494 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 24.088800
    Scaled convergence tolerance is 2.41888
  Stepsize computed as 0.211883
  BUILD              6 29.371482 24.088800
  HI-REDUCTION       8 26.889548 24.088800
  Exiting from Nelder Mead minimizer
      10 function evaluations used
          step    negloglik     sigma.sq           mu           SE           bt 
   1.000000000 24.088800143  0.117682960  2.118832288  0.007956494  1.000000000 
            vh 
   0.007956494 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 24.088800
    Scaled convergence tolerance is 2.41888
  Stepsize computed as 0.211883
  BUILD              6 29.371482 24.088800
  HI-REDUCTION       8 26.889548 24.088800
  Exiting from Nelder Mead minimizer
      10 function evaluations used
          step    negloglik     sigma.sq           mu           SE           bt 
   2.000000000 24.088800143  0.117682960  2.118832288  0.007956494  1.000000000 
            vh 
   0.007956494 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 24.059381
    Scaled convergence tolerance is 2.41594
  Stepsize computed as 0.197892
  BUILD              6 28.897223 24.059381
  HI-REDUCTION       8 26.535758 24.059381
  Exiting from Nelder Mead minimizer
      10 function evaluations used
  [1] "New improvement found, resetting step counter"
          step    negloglik     sigma.sq           mu           SE           bt 
   3.000000000 24.059380751  0.114008383  1.978920027  0.007925607  0.997232305 
            vh 
   0.007864401 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 24.238515
    Scaled convergence tolerance is 2.43385
  Stepsize computed as 0.214282
  BUILD              6 29.625189 24.238515
  HI-REDUCTION       8 27.153609 24.238515
  Exiting from Nelder Mead minimizer
      10 function evaluations used
          step    negloglik     sigma.sq           mu           SE           bt 
   4.000000000 24.059380751  0.114008383  1.978920027  0.007925607  0.997232305 
            vh 
   0.007864401 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 24.374634
    Scaled convergence tolerance is 2.44746
  Stepsize computed as 0.211888
  BUILD              6 29.482474 24.374634
  HI-REDUCTION       8 27.044622 24.374634
  Exiting from Nelder Mead minimizer
      10 function evaluations used
          step    negloglik     sigma.sq           mu           SE           bt 
   5.000000000 24.059380751  0.114008383  1.978920027  0.007925607  0.997232305 
            vh 
   0.007864401 
  [1] "100 of 100 done"
  [1] "Now starting analysis"
  [1] "Starting with initial values"
   sigma.sq        mu        SE        bt        vh 
  2.4826704 0.6184483 0.0248267 1.0000000 0.0248267 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 13.561613
    Scaled convergence tolerance is 1.36616
  Stepsize computed as 0.248267
  BUILD              6 13.561613 10.472178
  LO-REDUCTION       8 13.430135 10.472178
  EXTENSION         10 13.098172 9.589884
  EXTENSION         12 12.187380 8.686793
  LO-REDUCTION      14 11.246338 8.686793
  LO-REDUCTION      16 10.673981 8.686793
  LO-REDUCTION      18 10.472178 8.686793
  Exiting from Nelder Mead minimizer
      20 function evaluations used
        step  negloglik   sigma.sq         mu         SE         bt         vh 
   1.0000000  8.4322029  2.3331286 -0.4139867  0.7012793  1.6212380  0.8462672 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 8.432203
    Scaled convergence tolerance is 0.85322
  Stepsize computed as 0.233313
  Exiting from Nelder Mead minimizer
      6 function evaluations used
  [1] "New improvement found, resetting step counter"
        step  negloglik   sigma.sq         mu         SE         bt         vh 
   2.0000000  8.2549634  2.3331286 -0.4139867  0.7012793  1.8545509  0.8462672 
    Nelder-Mead direct search function minimizer
  -- 1. Error: Simulation works (@test_condition.R#31)  --------------------------
  non-finite value supplied by optim
  1: BMhyb(phy.graph = network, traits = tips, confidence.points = 100, max.steps = 2, 
         control = list(reltol = 0.1, trace = 6)) at testthat/test_condition.R:31
  2: OptimizeThoroughly(phy.graph = phy.graph, traits = traits, free.parameter.names = free.parameter.names, 
         measurement.error = measurement.error, gamma = gamma, do.Higham.correction = do.Higham.correction, 
         do.Brissette.correction = do.Brissette.correction, max.steps = max.steps, verbose = verbose, 
         control = control)
  3: stats::optim(par = starting.values, fn = TryComputeLikelihood, traits = traits, phy.graph = phy.graph, 
         measurement.error = measurement.error, gamma = gamma, do.Higham.correction = do.Higham.correction, 
         do.Brissette.correction = do.Brissette.correction, control = control)
  
  == testthat results  ===========================================================
  [ OK: 12 | SKIPPED: 0 | WARNINGS: 8 | FAILED: 1 ]
  1. Error: Simulation works (@test_condition.R#31) 
  
  Error: testthat unit tests failed
  Execution halted