Running ‘testthat.R’ [49s/61s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(beezdemand)
  > 
  > test_check("beezdemand")
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: zben
  Param Space: log10
  NLME Formula: y_ll4 ~ Q0 * exp(-(10^alpha/Q0) * (10^Q0) * x)
  Start values (first few): Q0_int=0.812, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: zben
  Param Space: log10
  NLME Formula: y_ll4 ~ Q0 * exp(-(10^alpha/Q0) * (10^Q0) * x)
  Start values (first few): Q0_int=0.812, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: zben
  Param Space: log10
  NLME Formula: y_ll4 ~ Q0 * exp(-(10^alpha/Q0) * (10^Q0) * x)
  Start values (first few): Q0_int=0.812, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Recoding 100 with 5.
  A total of 1 outlying values were replaced
  A total of 0 outlying values were replaced
  Saving _problems/test-descriptive-summary-268.R
  Saving _problems/test-descriptive-summary-280.R
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: zben
  Param Space: log10
  NLME Formula: y_ll4 ~ Q0 * exp(-(10^alpha/Q0) * (10^Q0) * x)
  Start values (first few): Q0_int=0.812, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: zben
  Param Space: log10
  NLME Formula: y_ll4 ~ Q0 * exp(-(10^alpha/Q0) * (10^Q0) * x)
  Start values (first few): Q0_int=0.812, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: zben
  Param Space: log10
  NLME Formula: y_ll4 ~ Q0 * exp(-(10^alpha/Q0) * (10^Q0) * x)
  Start values (first few): Q0_int=0.812, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Extended Summary of Empirical Demand Measures
  =============================================
  
  Data Overview:
    Number of subjects: 3
    Complete cases: 2 (66.7%)
  
  Descriptive Statistics for Empirical Measures:
  -----------------------------------------------
  
  Intensity:
    Min: 8.00
    Median: 10.00
    Mean: 10.00
    Max: 12.00
    SD: 2.00
  
  BP0:
    Min: 4.00
    Median: 4.00
    Mean: 4.00
    Max: 4.00
    SD: 0.00
    Missing: 1 (33.3%)
  
  BP1:
    Min: 3.00
    Median: 3.00
    Mean: 3.33
    Max: 4.00
    SD: 0.58
  
  Omaxe:
    Min: 8.00
    Median: 12.00
    Mean: 11.33
    Max: 14.00
    SD: 3.06
  
  Pmaxe:
    Min: 2.00
    Median: 2.00
    Mean: 2.00
    Max: 2.00
    SD: 0.00
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: exponentiated
  Param Space: log10
  NLME Formula: y ~ (10^Q0) * 10^(2 * (exp(-(10^alpha) * (10^Q0) * x) - 1))
  Start values (first few): Q0_int=0.813, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: exponentiated
  Param Space: log10
  NLME Formula: y ~ (10^Q0) * 10^(2 * (exp(-(10^alpha) * (10^Q0) * x) - 1))
  Start values (first few): Q0_int=0.813, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: exponentiated
  Param Space: natural
  NLME Formula: y ~ Q0 * 10^(2 * (exp(-alpha * Q0 * x) - 1))
  Start values (first few): Q0_int=6.5, alpha_int=0.001
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: exponentiated
  Param Space: log10
  NLME Formula: y ~ (10^Q0) * 10^(1.5 * (exp(-(10^alpha) * (10^Q0) * x) - 1))
  Start values (first few): Q0_int=0.813, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: exponentiated
  Param Space: log10
  NLME Formula: y ~ (10^Q0) * 10^(2.5 * (exp(-(10^alpha) * (10^Q0) * x) - 1))
  Start values (first few): Q0_int=0.813, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: exponentiated
  Param Space: log10
  NLME Formula: y ~ (10^Q0) * 10^(2 * (exp(-(10^alpha) * (10^Q0) * x) - 1))
  Start values (first few): Q0_int=0.813, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: exponentiated
  Param Space: log10
  NLME Formula: y ~ (10^Q0) * 10^(2 * (exp(-(10^alpha) * (10^Q0) * x) - 1))
  Start values (first few): Q0_int=0.813, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: exponentiated
  Param Space: log10
  NLME Formula: y ~ (10^Q0) * 10^(2 * (exp(-(10^alpha) * (10^Q0) * x) - 1))
  Start values (first few): Q0_int=0.813, alpha_int=-3
  Number of fixed parameters: 4 (Q0: 2, alpha: 2)
  Note: LRT assumes models are nested (reduced model is a special case of the full model). Nesting is not automatically verified. See ?compare_models for guidance on valid model comparisons.
  Note: LRT assumes models are nested (reduced model is a special case of the full model). Nesting is not automatically verified. See ?compare_models for guidance on valid model comparisons.
  Note: LRT assumes models are nested (reduced model is a special case of the full model). Nesting is not automatically verified. See ?compare_models for guidance on valid model comparisons.
  Note: LRT assumes models are nested (reduced model is a special case of the full model). Nesting is not automatically verified. See ?compare_models for guidance on valid model comparisons.
  Generating starting values using method: 'heuristic'
  Using heuristic method for starting values.
  --- Fitting NLME Model ---
  Equation Form: zben
  Param Space: log10
  NLME Formula: y_ll4 ~ Q0 * exp(-(10^alpha/Q0) * (10^Q0) * x)
  Start values (first few): Q0_int=0.812, alpha_int=-3
  Number of fixed parameters: 2 (Q0: 1, alpha: 1)
  Note: LRT assumes models are nested (reduced model is a special case of the full model). Nesting is not automatically verified. See ?compare_models for guidance on valid model comparisons.
  Free is shown as `0.01` for purposes of plotting.
  Free is shown as `0.01` for purposes of plotting.
  [ FAIL 2 | WARN 121 | SKIP 105 | PASS 1101 ]
  
  ══ Skipped tests (105) ═════════════════════════════════════════════════════════
  • On CRAN (104): 'test-broom-contracts.R:5:3', 'test-broom-contracts.R:34:3',
    'test-broom-contracts.R:57:3', 'test-broom-contracts.R:82:3',
    'test-confint.R:78:3', 'test-confint.R:100:3', 'test-confint.R:128:3',
    'test-confint.R:171:3', 'test-confint.R:213:3', 'test-confint.R:240:3',
    'test-fit_demand_fixed.R:19:3', 'test-fit_demand_fixed.R:151:3',
    'test-fit_demand_fixed.R:462:3', 'test-fit_demand_fixed.R:539:3',
    'test-fit_demand_fixed.R:557:3', 'test-fit_demand_hurdle.R:4:3',
    'test-fit_demand_hurdle.R:31:3', 'test-fit_demand_hurdle.R:75:3',
    'test-fit_demand_hurdle.R:101:3', 'test-fit_demand_hurdle.R:146:3',
    'test-fit_demand_hurdle.R:170:3', 'test-fit_demand_hurdle.R:201:3',
    'test-fit_demand_hurdle.R:227:3', 'test-fit_demand_hurdle.R:247:3',
    'test-hurdle-alpha-component.R:2:3', 'test-hurdle_methods.R:4:3',
    'test-hurdle_methods.R:23:3', 'test-hurdle_methods.R:50:3',
    'test-hurdle_methods.R:73:3', 'test-hurdle_methods.R:100:3',
    'test-hurdle_methods.R:122:3', 'test-hurdle_methods.R:148:3',
    'test-hurdle_methods.R:171:3', 'test-hurdle_methods.R:196:3',
    'test-hurdle_methods.R:218:3', 'test-hurdle_part2_variants.R:68:3',
    'test-hurdle_part2_variants.R:123:3', 'test-hurdle_simulate.R:100:3',
    'test-hurdle_simulate.R:120:3', 'test-hurdle_simulate.R:148:3',
    'test-hurdle_simulate.R:163:3', 'test-hurdle_utils.R:66:3',
    'test-hurdle_utils.R:86:3', 'test-hurdle_utils.R:107:3',
    'test-hurdle_utils.R:157:3', 'test-hurdle_utils.R:179:3',
    'test-legacy-contracts.R:129:3', 'test-legacy-contracts.R:164:3',
    'test-legacy-contracts.R:223:3', 'test-legacy-fitcurves.R:92:3',
    'test-legacy-fitcurves.R:122:3', 'test-legacy-fitcurves.R:185:3',
    'test-legacy-fitmean.R:103:3', 'test-legacy-fitmean.R:123:3',
    'test-legacy-fitmean.R:206:3', 'test-legacy-fitmean.R:226:3',
    'test-param-space-report-space.R:9:3',
    'test-param-space-report-space.R:57:3',
    'test-param-space-report-space.R:98:3', 'test-plot-contracts.R:22:3',
    'test-plot_hurdle.R:4:3', 'test-plot_hurdle.R:24:3',
    'test-plot_hurdle.R:44:3', 'test-plot_hurdle.R:69:3',
    'test-plot_hurdle.R:93:3', 'test-plot_hurdle.R:117:3',
    'test-plot_hurdle.R:137:3', 'test-plot_hurdle.R:157:3',
    'test-predict-contracts.R:2:3', 'test-predict-contracts.R:33:3',
    'test-predict_fixed.R:2:3', 'test-predict_fixed.R:23:3',
    'test-predict_fixed.R:39:3', 'test-predict_fixed.R:55:3',
    'test-predict_fixed.R:67:3', 'test-predict_fixed.R:83:3',
    'test-summary-contracts.R:5:3', 'test-summary-contracts.R:63:3',
    'test_emms_comparisons.R:53:3', 'test_emms_comparisons.R:89:3',
    'test_emms_comparisons.R:132:3', 'test_emms_comparisons.R:160:3',
    'test_emms_comparisons.R:195:3', 'test_emms_comparisons.R:229:3',
    'test_emms_comparisons.R:265:3', 'test_emms_comparisons.R:301:3',
    'test_emms_comparisons.R:338:3', 'test_emms_comparisons.R:414:3',
    'test_fit_demand_mixed.R:236:3', 'test_fit_demand_mixed.R:255:3',
    'test_fit_demand_mixed.R:293:3', 'test_fit_demand_mixed.R:318:3',
    'test_fit_demand_mixed.R:357:3', 'test_fit_demand_mixed.R:391:3',
    'test_fit_demand_mixed.R:437:3', 'test_fit_demand_mixed.R:474:3',
    'test_fit_demand_mixed.R:505:3', 'test_fit_demand_mixed.R:532:3',
    'test_fit_demand_mixed.R:687:3', 'test_fit_demand_mixed.R:735:3',
    'test_fit_demand_mixed.R:769:3', 'test_fit_demand_mixed.R:794:3',
    'test_plot_individual_grid.R:2:3', 'test_plot_individual_grid.R:83:3'
  • {GGally} is not installed (1): 'test-empirical-measures.R:306:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-descriptive-summary.R:268:3'): print.beezdemand_descriptive runs without error ──
  Error in `file(file, if (append) "a" else "w")`: cannot open the connection
  Backtrace:
       ▆
    1. └─testthat::expect_output(print(result), "Statistics by Price") at test-descriptive-summary.R:268:3
    2.   └─testthat:::quasi_capture(...)
    3.     └─testthat (local) .capture(...)
    4.       └─testthat::capture_output_lines(code, print, width = width)
    5.         └─testthat:::eval_with_output(code, print = print, width = width)
    6.           └─withr::with_output_sink(path, withVisible(code))
    7.             └─withr:::set_output_sink(file = new, append = append, split = split)
    8.               └─withr:::output_sink(file = file, append = append, split = split)
    9.                 └─base::sink(file = file, append = append, type = "output", split = split)
   10.                   └─base::file(file, if (append) "a" else "w")
  ── Error ('test-descriptive-summary.R:280:3'): summary.beezdemand_descriptive runs without error ──
  Error in `file(file, if (append) "a" else "w")`: cannot open the connection
  Backtrace:
       ▆
    1. └─testthat::expect_output(summary(result), "Extended Summary") at test-descriptive-summary.R:280:3
    2.   └─testthat:::quasi_capture(...)
    3.     └─testthat (local) .capture(...)
    4.       └─testthat::capture_output_lines(code, print, width = width)
    5.         └─testthat:::eval_with_output(code, print = print, width = width)
    6.           └─withr::with_output_sink(path, withVisible(code))
    7.             └─withr:::set_output_sink(file = new, append = append, split = split)
    8.               └─withr:::output_sink(file = file, append = append, split = split)
    9.                 └─base::sink(file = file, append = append, type = "output", split = split)
   10.                   └─base::file(file, if (append) "a" else "w")
  
  [ FAIL 2 | WARN 121 | SKIP 105 | PASS 1101 ]
  Error:
  ! Test failures.
  Execution halted