Running ‘testthat.R’ [22s/34s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(CPBayes)
  > 
  > test_check("CPBayes")
  Important traits with trait-specific posterior prob of assoc: 
  None
  Important traits with trait-specific posterior prob of assoc: 
  None
  Important traits with trait-specific posterior prob of assoc: 
  None
  Important traits with trait-specific posterior prob of assoc: 
  None
  Important traits with trait-specific posterior prob of assoc: 
  None
  Important traits with trait-specific posterior prob of assoc: 
  None
  Important traits with trait-specific posterior prob of assoc: 
  None
  Important traits with trait-specific posterior prob of assoc: 
  None
  Important traits with trait-specific posterior prob of assoc: 
  None
  Important traits with trait-specific posterior prob of assoc: 
  None
  Important traits with trait-specific posterior prob of assoc: 
  None
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (16)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-InputPhenGenVarCor.R:5:3): Throws error if the argument Phenotypes is present but not a character vector of same length as BetaHat with no duplicate entry ──
  `cpbayes_cor(...)` threw an error with unexpected message.
  Expected match: "Phenotypes must be a vector."
  Actual message: "Phenotypes must be a character vector."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-InputPhenGenVarCor.R:5:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─CPBayes::cpbayes_cor(...)
   7.   └─CPBayes:::checkPhen(Phenotypes, BetaHat)
  ── Failure (test-InputPhenGenVarCor.R:13:3): Throws error if the argument Variant is present but not a character vector of 1 ──
  `cpbayes_cor(1:10, 1:10, ExampleDataCor$cor, Variant = as.data.frame("A"))` did not throw an error.
  ── Failure (test-InputPhenGenVarUnCor.R:5:3): Throws error if the argument Phenotypes is present but not a character vector of same length as BetaHat with no duplicate entry ──
  `cpbayes_uncor(1:10, 1:10, as.data.frame(c("phen1", "phen2")))` threw an error with unexpected message.
  Expected match: "Phenotypes must be a vector."
  Actual message: "Phenotypes must be a character vector."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-InputPhenGenVarUnCor.R:5:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─CPBayes::cpbayes_uncor(1:10, 1:10, as.data.frame(c("phen1", "phen2")))
   7.   └─CPBayes:::checkPhen(Phenotypes, BetaHat)
  ── Failure (test-InputPhenGenVarUnCor.R:13:3): Throws error if the argument Variant is present but not a character vector of 1 ──
  `cpbayes_uncor(1:10, 1:10, Variant = as.data.frame("A"))` did not throw an error.
  ── Failure (test-InputPrimaryCor.R:16:3): Throws error if BetaHat is not a numeric vector of length more than 1 and no missing value ──
  `cpbayes_cor(data.frame(rep(1:10)), 1:10, ExampleDataCor$cor)` threw an error with unexpected message.
  Expected match: "BetaHat must be a vector."
  Actual message: "BetaHat must be a numeric vector."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-InputPrimaryCor.R:16:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─CPBayes::cpbayes_cor(data.frame(rep(1:10)), 1:10, ExampleDataCor$cor)
   7.   └─CPBayes:::checkPrimaryVar(BetaHat, "BetaHat")
  ── Failure (test-InputPrimaryCor.R:27:3): Throws error if SE is not a positive numeric vector of length more than 1 and no missing value ──
  `cpbayes_cor(1:10, data.frame(rep(1:10)), ExampleDataCor$cor)` threw an error with unexpected message.
  Expected match: "SE must be a vector."
  Actual message: "SE must be a numeric vector."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-InputPrimaryCor.R:27:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─CPBayes::cpbayes_cor(1:10, data.frame(rep(1:10)), ExampleDataCor$cor)
   7.   └─CPBayes:::checkPrimaryVar(SE, "SE")
  ── Failure (test-InputPrimaryLocFDR_BF_theoretic_Cor.R:16:3): Throws error if BetaHat is not a numeric vector of length more than 1 and no missing value ──
  `analytic_locFDR_BF_cor(data.frame(rep(1:10)), 1:10, ExampleDataCor$cor)` threw an error with unexpected message.
  Expected match: "BetaHat must be a vector."
  Actual message: "BetaHat must be a numeric vector."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-InputPrimaryLocFDR_BF_theoretic_Cor.R:16:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─CPBayes::analytic_locFDR_BF_cor(...)
   7.   └─CPBayes:::checkPrimaryVar(BetaHat, "BetaHat")
  ── Failure (test-InputPrimaryLocFDR_BF_theoretic_Cor.R:27:3): Throws error if SE is not a positive numeric vector of length more than 1 and no missing value ──
  `analytic_locFDR_BF_cor(1:10, data.frame(rep(1:10)), ExampleDataCor$cor)` threw an error with unexpected message.
  Expected match: "SE must be a vector."
  Actual message: "SE must be a numeric vector."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-InputPrimaryLocFDR_BF_theoretic_Cor.R:27:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─CPBayes::analytic_locFDR_BF_cor(...)
   7.   └─CPBayes:::checkPrimaryVar(SE, "SE")
  ── Failure (test-InputPrimaryLocFDR_BF_theoretic_UnCor.R:15:3): Throws error if BetaHat is not a numeric vector of length more than 1 and no missing value ──
  `analytic_locFDR_BF_uncor(data.frame(rep(1:10)), 1:10)` threw an error with unexpected message.
  Expected match: "BetaHat must be a vector."
  Actual message: "BetaHat must be a numeric vector."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-InputPrimaryLocFDR_BF_theoretic_UnCor.R:15:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─CPBayes::analytic_locFDR_BF_uncor(data.frame(rep(1:10)), 1:10)
   7.   └─CPBayes:::checkPrimaryVar(BetaHat, "BetaHat")
  ── Failure (test-InputPrimaryLocFDR_BF_theoretic_UnCor.R:26:3): Throws error if SE is not a positive numeric vector of length more than 1 and no missing value ──
  `analytic_locFDR_BF_uncor(1:10, data.frame(rep(1:10)))` threw an error with unexpected message.
  Expected match: "SE must be a vector."
  Actual message: "SE must be a numeric vector."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-InputPrimaryLocFDR_BF_theoretic_UnCor.R:26:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─CPBayes::analytic_locFDR_BF_uncor(1:10, data.frame(rep(1:10)))
   7.   └─CPBayes:::checkPrimaryVar(SE, "SE")
  ── Failure (test-InputPrimaryUnCor.R:15:3): Throws error if BetaHat is not a numeric vector of length more than 1 and no missing value ──
  `cpbayes_uncor(data.frame(rep(1:10)), 1:10)` threw an error with unexpected message.
  Expected match: "BetaHat must be a vector."
  Actual message: "BetaHat must be a numeric vector."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-InputPrimaryUnCor.R:15:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─CPBayes::cpbayes_uncor(data.frame(rep(1:10)), 1:10)
   7.   └─CPBayes:::checkPrimaryVar(BetaHat, "BetaHat")
  ── Failure (test-InputPrimaryUnCor.R:26:3): Throws error if SE is not a positive numeric vector of length more than 1 and no missing value ──
  `cpbayes_uncor(1:10, data.frame(rep(1:10)))` threw an error with unexpected message.
  Expected match: "SE must be a vector."
  Actual message: "SE must be a numeric vector."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-InputPrimaryUnCor.R:26:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─CPBayes::cpbayes_uncor(1:10, data.frame(rep(1:10)))
   7.   └─CPBayes:::checkPrimaryVar(SE, "SE")
  
  [ FAIL 12 | WARN 2 | SKIP 16 | PASS 137 ]
  Error: Test failures
  Execution halted