Running ‘testthat.R’ [10s/16s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > #
  > # file: tests/testthat.R
  > #
  > # This file is part of the R-package decisionSupport
  > # 
  > # Authors: 
  > #   Lutz Göhring <lutz.goehring@gmx.de>
  > #   Eike Luedeling (ICRAF) <eike@eikeluedeling.com>
  > #
  > # Copyright (C) 2015 World Agroforestry Centre (ICRAF) 
  > #	http://www.worldagroforestry.org
  > # 
  > # The R-package decisionSupport is free software: you can redistribute it and/or modify
  > # it under the terms of the GNU General Public License as published by
  > # the Free Software Foundation, either version 3 of the License, or
  > # (at your option) any later version.
  > # 
  > # The R-package decisionSupport is distributed in the hope that it will be useful,
  > # but WITHOUT ANY WARRANTY; without even the implied warranty of
  > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  > # GNU General Public License for more details.
  > # 
  > # You should have received a copy of the GNU General Public License
  > # along with the R-package decisionSupport.  If not, see <http://www.gnu.org/licenses/>.
  > #
  > ##############################################################################################
  > 
  > library(testthat)
  > #library(decisionSupport)
  > 
  > test_check("decisionSupport")
  Loading required package: decisionSupport
  The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
  which was just loaded, were retired in October 2023.
  Please refer to R-spatial evolution reports for details, especially
  https://r-spatial.org/r/2023/05/15/evolution4.html.
  It may be desirable to make the sf package available;
  package maintainers should consider adding sf to Suggests:.
  [ FAIL 22 | WARN 0 | SKIP 6 | PASS 81 ]
  
  ══ Skipped tests (6) ═══════════════════════════════════════════════════════════
  • empty test (6): 'test_rtnorm90ci.R:54:1', 'test_rtnorm90ci.R:111:1',
    'test_rtnorm90ci.R:122:1', 'test_rtnorm90ci.R:151:1',
    'test_welfareDecisionAnalysis.R:34:1', 'test_welfareDecisionAnalysis.R:48:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_estimate1d.R:46:3'): method="calculate": Warning is generated for deviation from median if supplied ──
  Error in `estimate1d("lnorm", lower, upper, median = "mean")`: Optional argument "median" is not atomic.
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test_estimate1d.R:46:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─decisionSupport::random(...)
   7. └─decisionSupport::estimate1d("lnorm", lower, upper, median = "mean")
  ── Error ('test_estimate1d.R:60:3'): method="fit": Warning is generated if no median is supplied or for deviation from median (if supplied) ──
  Error in `estimate1d("lnorm", lower, upper, median = "mean")`: Optional argument "median" is not atomic.
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test_estimate1d.R:60:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─decisionSupport::random(...)
   7. └─decisionSupport::estimate1d("lnorm", lower, upper, median = "mean")
  ── Error ('test_individualEvpiSimulation.R:43:3'): Individual EVPI is calculated for 2-D correltated current estimate. ──
  Error in `h(simpleError(msg, call))`: Variable: revenue
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::individualEvpiSimulation(...) at test_individualEvpiSimulation.R:43:2
    2. │ └─decisionSupport::eviSimulation(...)
    3. │   └─base::lapply(...)
    4. │     └─decisionSupport (local) FUN(X[[i]], ...)
    5. │       └─decisionSupport::welfareDecisionAnalysis(...)
    6. │         └─decisionSupport::mcSimulation(...)
    7. │           ├─decisionSupport::random(...)
    8. │           └─decisionSupport:::random.estimate(...)
    9. │             ├─decisionSupport::random(...)
   10. │             └─decisionSupport:::random.estimateUnCorrelated(...)
   11. │               ├─base::withCallingHandlers(...)
   12. │               ├─base::cbind(...)
   13. │               ├─base::matrix(...)
   14. │               ├─decisionSupport::random(...)
   15. │               └─decisionSupport::as.estimate1d(rho[i, ])
   16. │                 └─decisionSupport::estimate1d(...)
   17. │                   └─base::stop("Optional argument \"", i, "\" is not atomic.")
   18. └─base::.handleSimpleError(...)
   19.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_individualEvpiSimulation.R:69:3'): Individual EVPI is calculated for 3-D correlated current estimate. ──
  Error in `h(simpleError(msg, call))`: Variable: revenue1
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::individualEvpiSimulation(...) at test_individualEvpiSimulation.R:69:2
    2. │ └─decisionSupport::eviSimulation(...)
    3. │   └─base::lapply(...)
    4. │     └─decisionSupport (local) FUN(X[[i]], ...)
    5. │       └─decisionSupport::welfareDecisionAnalysis(...)
    6. │         └─decisionSupport::mcSimulation(...)
    7. │           ├─decisionSupport::random(...)
    8. │           └─decisionSupport:::random.estimate(...)
    9. │             ├─base::cbind(...)
   10. │             ├─decisionSupport::random(...)
   11. │             └─decisionSupport:::random.estimateUnCorrelated(...)
   12. │               ├─base::withCallingHandlers(...)
   13. │               ├─base::cbind(...)
   14. │               ├─base::matrix(...)
   15. │               ├─decisionSupport::random(...)
   16. │               └─decisionSupport::as.estimate1d(rho[i, ])
   17. │                 └─decisionSupport::estimate1d(...)
   18. │                   └─base::stop("Optional argument \"", i, "\" is not atomic.")
   19. └─base::.handleSimpleError(...)
   20.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_individualEvpiSimulation.R:95:3'): Individual EVPI is calculated for 4-D partly correlated current estimate. ──
  Error in `h(simpleError(msg, call))`: Variable: revenue2
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::individualEvpiSimulation(...) at test_individualEvpiSimulation.R:95:2
    2. │ ├─base::colMeans(...)
    3. │ │ └─base::is.data.frame(x)
    4. │ ├─base::as.data.frame(...)
    5. │ ├─decisionSupport::random(...)
    6. │ └─decisionSupport:::random.estimate(...)
    7. │   ├─base::cbind(...)
    8. │   ├─decisionSupport::random(...)
    9. │   └─decisionSupport:::random.estimateUnCorrelated(...)
   10. │     ├─base::withCallingHandlers(...)
   11. │     ├─base::cbind(...)
   12. │     ├─base::matrix(...)
   13. │     ├─decisionSupport::random(...)
   14. │     └─decisionSupport::as.estimate1d(rho[i, ])
   15. │       └─decisionSupport::estimate1d(...)
   16. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   17. └─base::.handleSimpleError(...)
   18.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_individualEvpiSimulation.R:126:13'): Individual EVPI is calculated for 4-D uncorrelated current estimate
             and 2 dimensional unnamed model function
            (randomMethod="calculate", functionSyntax="plainNames") (1). ──
  Error in `h(simpleError(msg, call))`: Variable: revenue1
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::individualEvpiSimulation(...) at test_individualEvpiSimulation.R:126:12
    2. │ ├─base::colMeans(...)
    3. │ │ └─base::is.data.frame(x)
    4. │ ├─base::as.data.frame(...)
    5. │ ├─decisionSupport::random(...)
    6. │ └─decisionSupport:::random.estimate(...)
    7. │   ├─decisionSupport::random(...)
    8. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    9. │     ├─base::withCallingHandlers(...)
   10. │     ├─base::cbind(...)
   11. │     ├─base::matrix(...)
   12. │     ├─decisionSupport::random(...)
   13. │     └─decisionSupport::as.estimate1d(rho[i, ])
   14. │       └─decisionSupport::estimate1d(...)
   15. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   16. └─base::.handleSimpleError(...)
   17.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_individualEvpiSimulation.R:151:14'): Example from Hubbard (2014), ch. 7, The value of information for ranges
             is reproduced correctly. ──
  Error in `h(simpleError(msg, call))`: Variable: sales
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::individualEvpiSimulation(...) at test_individualEvpiSimulation.R:151:13
    2. │ ├─base::colMeans(...)
    3. │ │ └─base::is.data.frame(x)
    4. │ ├─base::as.data.frame(...)
    5. │ ├─decisionSupport::random(...)
    6. │ └─decisionSupport:::random.estimate(...)
    7. │   ├─decisionSupport::random(...)
    8. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    9. │     ├─base::withCallingHandlers(...)
   10. │     ├─base::cbind(...)
   11. │     ├─base::matrix(...)
   12. │     ├─decisionSupport::random(...)
   13. │     └─decisionSupport::as.estimate1d(rho[i, ])
   14. │       └─decisionSupport::estimate1d(...)
   15. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   16. └─base::.handleSimpleError(...)
   17.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_mcSimulaton.R:52:13'): Difference of two uncorrelated normally distributed variables is normally distributed
            (randomMethod="calculate", functionSyntax="data.frameNames") (1). ──
  Error in `h(simpleError(msg, call))`: Variable: revenue
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::mcSimulation(...) at test_mcSimulaton.R:52:12
    2. │ ├─decisionSupport::random(...)
    3. │ └─decisionSupport:::random.estimate(...)
    4. │   ├─decisionSupport::random(...)
    5. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    6. │     ├─base::withCallingHandlers(...)
    7. │     ├─base::cbind(...)
    8. │     ├─base::matrix(...)
    9. │     ├─decisionSupport::random(...)
   10. │     └─decisionSupport::as.estimate1d(rho[i, ])
   11. │       └─decisionSupport::estimate1d(...)
   12. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   13. └─base::.handleSimpleError(...)
   14.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_mcSimulaton.R:78:13'): Difference of two uncorrelated normally distributed variables is normally distributed
            (randomMethod="calculate", functionSyntax="data.frameNames") (2). ──
  Error in `h(simpleError(msg, call))`: Variable: revenue
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::mcSimulation(...) at test_mcSimulaton.R:78:12
    2. │ ├─decisionSupport::random(...)
    3. │ └─decisionSupport:::random.estimate(...)
    4. │   ├─decisionSupport::random(...)
    5. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    6. │     ├─base::withCallingHandlers(...)
    7. │     ├─base::cbind(...)
    8. │     ├─base::matrix(...)
    9. │     ├─decisionSupport::random(...)
   10. │     └─decisionSupport::as.estimate1d(rho[i, ])
   11. │       └─decisionSupport::estimate1d(...)
   12. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   13. └─base::.handleSimpleError(...)
   14.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_mcSimulaton.R:104:13'): Difference of two uncorrelated normally distributed variables is normally distributed
            (randomMethod="calculate", functionSyntax="matrixNames"). ──
  Error in `h(simpleError(msg, call))`: Variable: revenue
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::mcSimulation(...) at test_mcSimulaton.R:104:12
    2. │ ├─decisionSupport::random(...)
    3. │ └─decisionSupport:::random.estimate(...)
    4. │   ├─decisionSupport::random(...)
    5. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    6. │     ├─base::withCallingHandlers(...)
    7. │     ├─base::cbind(...)
    8. │     ├─base::matrix(...)
    9. │     ├─decisionSupport::random(...)
   10. │     └─decisionSupport::as.estimate1d(rho[i, ])
   11. │       └─decisionSupport::estimate1d(...)
   12. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   13. └─base::.handleSimpleError(...)
   14.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_mcSimulaton.R:132:13'): Difference of two uncorrelated normally distributed variables is normally distributed
            (randomMethod="calculate", functionSyntax="plainNames") (1). ──
  Error in `h(simpleError(msg, call))`: Variable: revenue
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::mcSimulation(...) at test_mcSimulaton.R:132:12
    2. │ ├─decisionSupport::random(...)
    3. │ └─decisionSupport:::random.estimate(...)
    4. │   ├─decisionSupport::random(...)
    5. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    6. │     ├─base::withCallingHandlers(...)
    7. │     ├─base::cbind(...)
    8. │     ├─base::matrix(...)
    9. │     ├─decisionSupport::random(...)
   10. │     └─decisionSupport::as.estimate1d(rho[i, ])
   11. │       └─decisionSupport::estimate1d(...)
   12. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   13. └─base::.handleSimpleError(...)
   14.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_mcSimulaton.R:212:13'): 5 dimensional estimate and 2 dimensional named model function are simulated:
            (randomMethod="calculate", functionSyntax="plainNames") (1). ──
  Error in `h(simpleError(msg, call))`: Variable: b
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::mcSimulation(...) at test_mcSimulaton.R:212:12
    2. │ ├─decisionSupport::random(...)
    3. │ └─decisionSupport:::random.estimate(...)
    4. │   ├─decisionSupport::random(...)
    5. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    6. │     ├─base::withCallingHandlers(...)
    7. │     ├─base::cbind(...)
    8. │     ├─base::matrix(...)
    9. │     ├─decisionSupport::random(...)
   10. │     └─decisionSupport::as.estimate1d(rho[i, ])
   11. │       └─decisionSupport::estimate1d(...)
   12. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   13. └─base::.handleSimpleError(...)
   14.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_mcSimulaton.R:240:13'): 4 dimensional estimate and 2 dimensional unnamed model function are simulated:
            (randomMethod="calculate", functionSyntax="plainNames") (1). ──
  Error in `h(simpleError(msg, call))`: Variable: revenue1
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::mcSimulation(...) at test_mcSimulaton.R:240:12
    2. │ ├─decisionSupport::random(...)
    3. │ └─decisionSupport:::random.estimate(...)
    4. │   ├─decisionSupport::random(...)
    5. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    6. │     ├─base::withCallingHandlers(...)
    7. │     ├─base::cbind(...)
    8. │     ├─base::matrix(...)
    9. │     ├─decisionSupport::random(...)
   10. │     └─decisionSupport::as.estimate1d(rho[i, ])
   11. │       └─decisionSupport::estimate1d(...)
   12. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   13. └─base::.handleSimpleError(...)
   14.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_mcSimulaton.R:268:13'): 2 dimensional estimate and 1 dimensional  model function returning an unnamed list are simulated:
            (randomMethod="calculate", functionSyntax="plainNames") (1). ──
  Error in `h(simpleError(msg, call))`: Variable: revenue
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::mcSimulation(...) at test_mcSimulaton.R:268:12
    2. │ ├─decisionSupport::random(...)
    3. │ └─decisionSupport:::random.estimate(...)
    4. │   ├─decisionSupport::random(...)
    5. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    6. │     ├─base::withCallingHandlers(...)
    7. │     ├─base::cbind(...)
    8. │     ├─base::matrix(...)
    9. │     ├─decisionSupport::random(...)
   10. │     └─decisionSupport::as.estimate1d(rho[i, ])
   11. │       └─decisionSupport::estimate1d(...)
   12. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   13. └─base::.handleSimpleError(...)
   14.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_mcSimulaton.R:292:13'): 2 dimensional estimate and 2 dimensional  model function returning an unnamed list are simulated:
            (randomMethod="calculate", functionSyntax="data.frameNames") (1). ──
  Error in `h(simpleError(msg, call))`: Variable: revenue
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::mcSimulation(...) at test_mcSimulaton.R:292:12
    2. │ ├─decisionSupport::random(...)
    3. │ └─decisionSupport:::random.estimate(...)
    4. │   ├─decisionSupport::random(...)
    5. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    6. │     ├─base::withCallingHandlers(...)
    7. │     ├─base::cbind(...)
    8. │     ├─base::matrix(...)
    9. │     ├─decisionSupport::random(...)
   10. │     └─decisionSupport::as.estimate1d(rho[i, ])
   11. │       └─decisionSupport::estimate1d(...)
   12. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   13. └─base::.handleSimpleError(...)
   14.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_mcSimulaton.R:315:13'): 5 dimensional estimate and 2 dimensional named model function are simulated:
            (randomMethod="calculate", functionSyntax="plainNames") (1). ──
  Error in `h(simpleError(msg, call))`: Variable: b
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::mcSimulation(...) at test_mcSimulaton.R:315:12
    2. │ ├─decisionSupport::random(...)
    3. │ └─decisionSupport:::random.estimate(...)
    4. │   ├─decisionSupport::random(...)
    5. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    6. │     ├─base::withCallingHandlers(...)
    7. │     ├─base::cbind(...)
    8. │     ├─base::matrix(...)
    9. │     ├─decisionSupport::random(...)
   10. │     └─decisionSupport::as.estimate1d(rho[i, ])
   11. │       └─decisionSupport::estimate1d(...)
   12. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   13. └─base::.handleSimpleError(...)
   14.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_mcSimulaton.R:340:13'): 4 dimensional estimate and 2 dimensional unnamed model function are simulated:
            (randomMethod="calculate", functionSyntax="plainNames") (1). ──
  Error in `h(simpleError(msg, call))`: Variable: revenue1
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::mcSimulation(...) at test_mcSimulaton.R:340:12
    2. │ ├─decisionSupport::random(...)
    3. │ └─decisionSupport:::random.estimate(...)
    4. │   ├─decisionSupport::random(...)
    5. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    6. │     ├─base::withCallingHandlers(...)
    7. │     ├─base::cbind(...)
    8. │     ├─base::matrix(...)
    9. │     ├─decisionSupport::random(...)
   10. │     └─decisionSupport::as.estimate1d(rho[i, ])
   11. │       └─decisionSupport::estimate1d(...)
   12. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   13. └─base::.handleSimpleError(...)
   14.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_mcSimulaton.R:365:13'): 2 dimensional estimate and 1 dimensional  model function returning an unnamed list are simulated:
            (randomMethod="calculate", functionSyntax="plainNames") (1). ──
  Error in `h(simpleError(msg, call))`: Variable: revenue
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::mcSimulation(...) at test_mcSimulaton.R:365:12
    2. │ ├─decisionSupport::random(...)
    3. │ └─decisionSupport:::random.estimate(...)
    4. │   ├─decisionSupport::random(...)
    5. │   └─decisionSupport:::random.estimateUnCorrelated(...)
    6. │     ├─base::withCallingHandlers(...)
    7. │     ├─base::cbind(...)
    8. │     ├─base::matrix(...)
    9. │     ├─decisionSupport::random(...)
   10. │     └─decisionSupport::as.estimate1d(rho[i, ])
   11. │       └─decisionSupport::estimate1d(...)
   12. │         └─base::stop("Optional argument \"", i, "\" is not atomic.")
   13. └─base::.handleSimpleError(...)
   14.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_random.estimate.R:50:2'): 3d - standard normal distribution (correlated) is generated correctly from the 0.05 and 0.95 quantiles ──
  Error in `h(simpleError(msg, call))`: Variable: sales
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::random(rho = profitEstimate, n = n) at test_random.estimate.R:50:8
    2. ├─decisionSupport:::random.estimate(rho = profitEstimate, n = n)
    3. │ ├─base::cbind(...)
    4. │ ├─decisionSupport::random(...)
    5. │ └─decisionSupport:::random.estimateUnCorrelated(...)
    6. │   ├─base::withCallingHandlers(...)
    7. │   ├─base::cbind(...)
    8. │   ├─base::matrix(...)
    9. │   ├─decisionSupport::random(...)
   10. │   └─decisionSupport::as.estimate1d(rho[i, ])
   11. │     └─decisionSupport::estimate1d(...)
   12. │       └─base::stop("Optional argument \"", i, "\" is not atomic.")
   13. └─base::.handleSimpleError(...)
   14.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_welfareDecisionAnalysis.R:94:19'): Welfare Decision Analysis is run for 4-D partly correlated current estimate. ──
  Error in `h(simpleError(msg, call))`: Variable: revenue2
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::welfareDecisionAnalysis(...) at test_welfareDecisionAnalysis.R:94:18
    2. │ └─decisionSupport::mcSimulation(...)
    3. │   ├─decisionSupport::random(...)
    4. │   └─decisionSupport:::random.estimate(...)
    5. │     ├─base::cbind(...)
    6. │     ├─decisionSupport::random(...)
    7. │     └─decisionSupport:::random.estimateUnCorrelated(...)
    8. │       ├─base::withCallingHandlers(...)
    9. │       ├─base::cbind(...)
   10. │       ├─base::matrix(...)
   11. │       ├─decisionSupport::random(...)
   12. │       └─decisionSupport::as.estimate1d(rho[i, ])
   13. │         └─decisionSupport::estimate1d(...)
   14. │           └─base::stop("Optional argument \"", i, "\" is not atomic.")
   15. └─base::.handleSimpleError(...)
   16.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_welfareDecisionAnalysis.R:121:13'): Welfare Decision Analysis is run  for 4-D uncorrelated current estimate
             and 2 dimensional unnamed model function
            (randomMethod="calculate", functionSyntax="plainNames") (1). ──
  Error in `h(simpleError(msg, call))`: Variable: revenue1
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::welfareDecisionAnalysis(...) at test_welfareDecisionAnalysis.R:121:12
    2. │ └─decisionSupport::mcSimulation(...)
    3. │   ├─decisionSupport::random(...)
    4. │   └─decisionSupport:::random.estimate(...)
    5. │     ├─decisionSupport::random(...)
    6. │     └─decisionSupport:::random.estimateUnCorrelated(...)
    7. │       ├─base::withCallingHandlers(...)
    8. │       ├─base::cbind(...)
    9. │       ├─base::matrix(...)
   10. │       ├─decisionSupport::random(...)
   11. │       └─decisionSupport::as.estimate1d(rho[i, ])
   12. │         └─decisionSupport::estimate1d(...)
   13. │           └─base::stop("Optional argument \"", i, "\" is not atomic.")
   14. └─base::.handleSimpleError(...)
   15.   └─decisionSupport (local) h(simpleError(msg, call))
  ── Error ('test_welfareDecisionAnalysis.R:146:14'): Example from Hubbard (2014), ch. 7, The value of information for ranges
             is reproduced correctly for the current estimate. ──
  Error in `h(simpleError(msg, call))`: Variable: sales
  Optional argument "median" is not atomic.
  Backtrace:
       ▆
    1. ├─decisionSupport::welfareDecisionAnalysis(...) at test_welfareDecisionAnalysis.R:146:13
    2. │ └─decisionSupport::mcSimulation(...)
    3. │   ├─decisionSupport::random(...)
    4. │   └─decisionSupport:::random.estimate(...)
    5. │     ├─decisionSupport::random(...)
    6. │     └─decisionSupport:::random.estimateUnCorrelated(...)
    7. │       ├─base::withCallingHandlers(...)
    8. │       ├─base::cbind(...)
    9. │       ├─base::matrix(...)
   10. │       ├─decisionSupport::random(...)
   11. │       └─decisionSupport::as.estimate1d(rho[i, ])
   12. │         └─decisionSupport::estimate1d(...)
   13. │           └─base::stop("Optional argument \"", i, "\" is not atomic.")
   14. └─base::.handleSimpleError(...)
   15.   └─decisionSupport (local) h(simpleError(msg, call))
  
  [ FAIL 22 | WARN 0 | SKIP 6 | PASS 81 ]
  Error: Test failures
  Execution halted