Running 'testthat.R' [4s/5s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(episheet)
  > 
  > test_check("episheet")
  -- 1. Error: Test risk_ratio returns exected estimate (@test-risk.R#16)  -------
  Problem with `summarise()` input `n`.
  x could not find function "n"
  i Input `n` is `n()`.
  Backtrace:
    1. testthat::expect_equal(...)
    4. episheet::risk(data = dat, exposure = exposure_var, outcome = outcome_var)
    3. dplyr::filter(., !!exposure == 1 & !!outcome == 1)
   10. dplyr::summarise(., n = n())
   14. dplyr:::summarise_cols(.data, ...)
  
  -- 2. Error: Test risk_ratio returns exected lci (@test-risk.R#21)  ------------
  Problem with `summarise()` input `n`.
  x could not find function "n"
  i Input `n` is `n()`.
  Backtrace:
    1. testthat::expect_equal(...)
    4. episheet::risk(data = dat, exposure = exposure_var, outcome = outcome_var)
    3. dplyr::filter(., !!exposure == 1 & !!outcome == 1)
   10. dplyr::summarise(., n = n())
   14. dplyr:::summarise_cols(.data, ...)
  
  -- 3. Error: Test risk_ratio returns exected uci (@test-risk.R#26)  ------------
  Problem with `summarise()` input `n`.
  x could not find function "n"
  i Input `n` is `n()`.
  Backtrace:
    1. testthat::expect_equal(...)
    4. episheet::risk(data = dat, exposure = exposure_var, outcome = outcome_var)
    3. dplyr::filter(., !!exposure == 1 & !!outcome == 1)
   10. dplyr::summarise(., n = n())
   14. dplyr:::summarise_cols(.data, ...)
  
  -- 4. Error: Test risk_diff returns exected estimate (@test-risk.R#31)  --------
  Problem with `summarise()` input `n`.
  x could not find function "n"
  i Input `n` is `n()`.
  Backtrace:
    1. testthat::expect_equal(...)
    4. episheet::risk(data = dat, exposure = exposure_var, outcome = outcome_var)
    3. dplyr::filter(., !!exposure == 1 & !!outcome == 1)
   10. dplyr::summarise(., n = n())
   14. dplyr:::summarise_cols(.data, ...)
  
  -- 5. Error: Test risk_diff returns exected lci (@test-risk.R#36)  -------------
  Problem with `summarise()` input `n`.
  x could not find function "n"
  i Input `n` is `n()`.
  Backtrace:
    1. testthat::expect_equal(...)
    4. episheet::risk(data = dat, exposure = exposure_var, outcome = outcome_var)
    3. dplyr::filter(., !!exposure == 1 & !!outcome == 1)
   10. dplyr::summarise(., n = n())
   14. dplyr:::summarise_cols(.data, ...)
  
  -- 6. Error: Test risk_diff returns exected uci (@test-risk.R#41)  -------------
  Problem with `summarise()` input `n`.
  x could not find function "n"
  i Input `n` is `n()`.
  Backtrace:
    1. testthat::expect_equal(...)
    4. episheet::risk(data = dat, exposure = exposure_var, outcome = outcome_var)
    3. dplyr::filter(., !!exposure == 1 & !!outcome == 1)
   10. dplyr::summarise(., n = n())
   14. dplyr:::summarise_cols(.data, ...)
  
  -- 7. Error: rrmh returns expected value (@test-stratified_risk.R#6)  ----------
  Problem with `summarise()` input `Ts`.
  x could not find function "n"
  i Input `Ts` is `n()`.
  i The error occured in group 1: age = "<55y".
  Backtrace:
    1. testthat::expect_equal(...)
    4. episheet::stratified_risk(...)
    3. dplyr::group_by(., !!stratifier)
   10. dplyr::summarise(., Ts = n(), Tc = sum(!!outcome))
   14. dplyr:::summarise_cols(.data, ...)
  
  -- 8. Error: lci return expected value (@test-stratified_risk.R#13)  -----------
  Problem with `summarise()` input `Ts`.
  x could not find function "n"
  i Input `Ts` is `n()`.
  i The error occured in group 1: age = "<55y".
  Backtrace:
    1. testthat::expect_equal(...)
    4. episheet::stratified_risk(...)
    3. dplyr::group_by(., !!stratifier)
   10. dplyr::summarise(., Ts = n(), Tc = sum(!!outcome))
   14. dplyr:::summarise_cols(.data, ...)
  
  -- 9. Error: uci return expected value (@test-stratified_risk.R#28)  -----------
  Problem with `summarise()` input `Ts`.
  x could not find function "n"
  i Input `Ts` is `n()`.
  i The error occured in group 1: age = "<55y".
  Backtrace:
    1. testthat::expect_equal(...)
    4. episheet::stratified_risk(...)
    3. dplyr::group_by(., !!stratifier)
   10. dplyr::summarise(., Ts = n(), Tc = sum(!!outcome))
   14. dplyr:::summarise_cols(.data, ...)
  
  == testthat results  ===========================================================
  [ OK: 6 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 9 ]
  1. Error: Test risk_ratio returns exected estimate (@test-risk.R#16) 
  2. Error: Test risk_ratio returns exected lci (@test-risk.R#21) 
  3. Error: Test risk_ratio returns exected uci (@test-risk.R#26) 
  4. Error: Test risk_diff returns exected estimate (@test-risk.R#31) 
  5. Error: Test risk_diff returns exected lci (@test-risk.R#36) 
  6. Error: Test risk_diff returns exected uci (@test-risk.R#41) 
  7. Error: rrmh returns expected value (@test-stratified_risk.R#6) 
  8. Error: lci return expected value (@test-stratified_risk.R#13) 
  9. Error: uci return expected value (@test-stratified_risk.R#28) 
  
  Error: testthat unit tests failed
  Execution halted