Running ‘testthat.R’ [277s/384s]
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 = 23.892603
    Scaled convergence tolerance is 2.39926
  Stepsize computed as 0.224972
  BUILD              6 29.620463 23.892603
  HI-REDUCTION       8 26.989774 23.892603
  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 23.892602943  0.116567502  2.249720212  0.008478594  0.920768909 
            vh 
   0.008374500 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 24.420792
    Scaled convergence tolerance is 2.45208
  Stepsize computed as 0.242130
  BUILD              6 29.956888 24.420792
  HI-REDUCTION       8 27.235001 24.420792
  Exiting from Nelder Mead minimizer
      10 function evaluations used
          step    negloglik     sigma.sq           mu           SE           bt 
   4.000000000 23.892602943  0.116567502  2.249720212  0.008478594  0.920768909 
            vh 
   0.008374500 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 24.553061
    Scaled convergence tolerance is 2.46531
  Stepsize computed as 0.230504
  BUILD              6 29.977513 24.553061
  HI-REDUCTION       8 27.402551 24.553061
  Exiting from Nelder Mead minimizer
      10 function evaluations used
          step    negloglik     sigma.sq           mu           SE           bt 
   5.000000000 23.892602943  0.116567502  2.249720212  0.008478594  0.920768909 
            vh 
   0.008374500 
  [1] "100 of 100 done"
  [1] "Now starting analysis"
  [1] "Starting with initial values"
     sigma.sq          mu          SE          bt          vh 
   5.02955432 -1.05811582  0.05029554  1.00000000  0.05029554 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 8.913682
    Scaled convergence tolerance is 0.901368
  Stepsize computed as 0.502955
  BUILD              6 9.001061 7.758955
  LO-REDUCTION       8 8.962528 7.758955
  LO-REDUCTION      10 8.913682 7.758955
  Exiting from Nelder Mead minimizer
      12 function evaluations used
         step   negloglik    sigma.sq          mu          SE          bt 
   1.00000000  7.75895475  5.02955432 -1.05811582  0.05029554  1.50295543 
           vh 
   0.05029554 
    Nelder-Mead direct search function minimizer
  function value for initial parameters = 7.758955
    Scaled convergence tolerance is 0.785895
  Stepsize computed as 0.502955
  BUILD              6 8.131989 7.259351
  Exiting from Nelder Mead minimizer
      8 function evaluations used
  [1] "New improvement found, resetting step counter"
         step   negloglik    sigma.sq          mu          SE          bt 
   2.00000000  7.25935077  5.02955432 -1.05811582  0.05029554  2.00591086 
           vh 
   0.05029554 
    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: 9 | FAILED: 1 ]
  1. Error: Simulation works (@test_condition.R#31) 
  
  Error: testthat unit tests failed
  Execution halted