Running ‘testthat.R’ [14s/17s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > testthat::test_check("contingencytables")
  Loading required package: contingencytables
  Welcome to contingencytables 3.1.0.
  Please run ?chapX or list_functions(x) to see the functions related to chapter X.
  Saving _problems/test-biggerstaff-25.R
  Saving _problems/test-ch2-18.R
  Saving _problems/test-ch3-18.R
  Saving _problems/test-ch4-7.R
  Saving _problems/test-ch5-8.R
  Saving _problems/test-ch6-12.R
  Saving _problems/test-ch7-121.R
  [ FAIL 7 | WARN 9 | SKIP 0 | PASS 724 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-biggerstaff.R:22:3'): Brad's version of multiple_hypergeometric_pdf() solves NA issues ──
  Error in `file(file, if (append) "a" else "w")`: cannot open the connection
  Backtrace:
       ▆
    1. └─testthat::expect_output(...) at test-biggerstaff.R:22: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-ch2.R:15:3'): Chapter 2 functions basically work ───────────────
  Error in `file(file, if (append) "a" else "w")`: cannot open the connection
  Backtrace:
       ▆
    1. └─testthat::expect_output(...) at test-ch2.R:15: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-ch3.R:15:3'): Chapter 3 functions basically work ───────────────
  Error in `file(file, if (append) "a" else "w")`: cannot open the connection
  Backtrace:
       ▆
    1. └─testthat::expect_output(...) at test-ch3.R:15: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-ch4.R:4:3'): Chapter 4 functions basically work ────────────────
  Error in `file(file, if (append) "a" else "w")`: cannot open the connection
  Backtrace:
       ▆
    1. └─testthat::expect_output(...) at test-ch4.R:4: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-ch5.R:5:3'): Chapter 5 functions basically work ────────────────
  Error in `file(file, if (append) "a" else "w")`: cannot open the connection
  Backtrace:
       ▆
    1. └─testthat::expect_output(...) at test-ch5.R:5: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-ch6.R:9:3'): Chapter 6 functions basically work ────────────────
  Error in `file(file, if (append) "a" else "w")`: cannot open the connection
  Backtrace:
       ▆
    1. └─testthat::expect_output(...) at test-ch6.R:9: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-ch7.R:115:3'): Chapter 7 functions basically work ──────────────
  Error in `file(file, if (append) "a" else "w")`: cannot open the connection
  Backtrace:
       ▆
    1. └─testthat::expect_output(...) at test-ch7.R:115: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 7 | WARN 9 | SKIP 0 | PASS 724 ]
  Error:
  ! Test failures.
  Execution halted