Running ‘testthat.R’ [86s/143s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(OncoBayes2)
  This is OncoBayes2 version 0.8.8 (released 2023-03-03, git-sha 5dd66c0)
  > 
  > test_check("OncoBayes2")
  Loading required package: StanHeaders
  rstan (Version 2.21.8, GitRev: 2e1f913d3ca3)
  For execution on a local, multicore CPU with excess RAM we recommend calling
  options(mc.cores = parallel::detectCores()).
  To avoid recompilation of unchanged Stan programs, we recommend calling
  rstan_options(auto_write = TRUE)
  Tests running with fake sampling
  
  Attaching package: 'tibble'
  
  The following object is masked from 'package:assertthat':
  
      has_name
  
  
  Attaching package: 'tidyr'
  
  The following object is masked from 'package:rstan':
  
      extract
  
  The following object is masked from 'package:testthat':
  
      matches
  
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  Tests running with fake sampling
  No stratum defined - assigning all groups to single stratum "all"
  No stratum defined - assigning all groups to single stratum "all"
  No stratum defined - assigning all groups to single stratum "all"
  Bayesian Logistic Regression Model trial with 
  
  Number of observations   : 4 
  Number of historic groups: 2 
  Number of trial arms     : 2 
  Generated formula        :
   cbind(num_toxicities, num_patients - num_toxicities) ~
   1 + I(log(drug1/1)) |
   0 |
   stratum_id / group_id 
  
  Toxicity intervals and EWOC requirements:
  -----------------------------------------
  prob_underdose (   0 - 0.16] <= 1
     prob_target (0.16 - 0.33] <= 1
   prob_overdose (0.33 -    1] <= 0.25
  
  BLRM prior undefined!
  Bayesian Logistic Regression Model trial with 
  
  Number of observations   : 4 
  Number of historic groups: 2 
  Number of trial arms     : 2 
  Generated formula        :
   cbind(num_toxicities, num_patients - num_toxicities) ~
   1 + I(log(drug1/1)) |
   0 |
   stratum_id / group_id 
  
  Toxicity intervals and EWOC requirements:
  -----------------------------------------
  prob_underdose (   0 - 0.16] <= 1
     prob_target (0.16 - 0.33] <= 1
   prob_overdose (0.33 -    1] <= 0.25
  
  blrmfit summary:
  -------------------------------------------------------------------------------- 
  Bayesian Logistic Regression Model with EXchangeability-NonEXchangeability
  
  Number of observations: 6 
  Number of groups      : 4 
  Number of strata      : 1 
  Number of components  : 1 
  Number of interactions: 0 
  EXNEX components      : 0 
  EXNEX interactions    : 0 
  
  Observations per group:
     Group n Stratum n_total
  1 hist_A 2     all       6
  2 hist_B 2     all       6
  3  cur_A 1     all       0
  4  cur_B 1     all       0
  
  Groups per stratum:
    Stratum Groups n_total
  1     all      4      12
  
  Component posterior:
  Population mean posterior mu_log_beta
  intercept:
     mean se_mean      sd    2.5%     50%   97.5%   n_eff    Rhat 
    -3.85    0.72    0.56   -4.22   -3.85   -3.47    0.60     Inf 
  log-slope:
     mean se_mean      sd    2.5%     50%   97.5%   n_eff    Rhat 
   -0.391   0.087   0.068  -0.437  -0.391  -0.346   0.602     Inf 
  
  Population heterogeniety posterior tau_log_beta
  intercept:
     mean se_mean      sd    2.5%     50%   97.5%   n_eff    Rhat 
     0.23    0.22    0.17    0.12    0.23    0.34    0.60     Inf 
  log-slope:
     mean se_mean      sd    2.5%     50%   97.5%   n_eff    Rhat 
   0.1190  0.0037  0.0029  0.1171  0.1190  0.1210  0.6021     Inf 
  
  Population correlation posterior rho_log_beta
                   mean se_mean   sd  2.5%   50% 97.5% n_eff Rhat
  I(log(drug1/1)) 0.094    0.87 0.67 -0.36 0.094  0.55   0.6  Inf
  
  No interaction model posterior specified.
  Error in na.fail.default(X[[i]], ...) : missing values in object
  In addition: There were 12 warnings (use warnings() to see them)
  Bayesian Logistic Regression Model trial with 
  
  Number of observations   : 1 
  Number of historic groups: 1 
  Number of trial arms     : 1 
  Generated formula        :
   cbind(num_toxicities, num_patients - num_toxicities) ~
   1 + I(log(A/1)) |
   1 + I(log(B/1)) |
   1 + I(log(C/1)) |
   0 + I(2 * (A/1 * B/1) / (1 + A/1 * B/1))+ I(2 * (A/1 * C/1) / (1 + A/1 * C/1))+ I(2 * (B/1 * C/1) / (1 + B/1 * C/1))|
   stratum_id / group_id 
  
  Toxicity intervals and EWOC requirements:
  -----------------------------------------
  prob_underdose (   0 - 0.16] <= 1
     prob_target (0.16 - 0.33] <= 1
   prob_overdose (0.33 -    1] <= 0.25
  
  BLRM prior undefined!
  [ FAIL 5 | WARN 84 | SKIP 30 | PASS 324 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (27)
  • empty test (3)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-blrm_trial.R:70:3'): blrm_trial summary with prior ─────────────
  Error in `vectbl_assign(x[[j]], i, recycled_value[[j]])`: DLL requires the use of native symbols
  Backtrace:
       ▆
    1. └─OncoBayes2 (local) check_trial_with_prior_summary(examples$single_agent)
    2.   ├─base::with(...) at test-blrm_trial.R:70:2
    3.   └─base::with.default(...)
    4.     └─base::eval(substitute(expr), data, enclos = parent.frame())
    5.       └─base::eval(substitute(expr), data, enclos = parent.frame())
    6.         ├─base::`[<-`(...) at test-blrm_trial.R:106:4
    7.         └─tibble:::`[<-.tbl_df`(...) at test-blrm_trial.R:106:4
    8.           └─tibble:::tbl_subassign(x, i, j, value, i_arg, j_arg, substitute(value))
    9.             └─tibble:::tbl_subassign_row(xj, i, value, i_arg, value_arg, call)
   10.               ├─base::withCallingHandlers(...)
   11.               └─tibble:::vectbl_assign(x[[j]], i, recycled_value[[j]])
  ── Error ('test-blrm_trial.R:432:3'): bind_rows_0 sets non-existing columns to 0 and merges tibbles correctly ──
  Error in `vectbl_assign(x[[j]], cells[[j]], value)`: DLL requires the use of native symbols
  Backtrace:
      ▆
   1. └─OncoBayes2 (local) check_bind_rows_0()
   2.   └─OncoBayes2::bind_rows_0(example_A, example_B, example_A) at test-blrm_trial.R:432:2
   3.     ├─base::`[<-`(`*tmp*`, is.na(temp), value = `<dbl>`)
   4.     └─tibble:::`[<-.tbl_df`(`*tmp*`, is.na(temp), value = `<dbl>`)
   5.       └─tibble:::tbl_subassign_matrix(x, j, value, j_arg, substitute(value))
   6.         ├─base::withCallingHandlers(...)
   7.         └─tibble:::vectbl_assign(x[[j]], cells[[j]], value)
  ── Error ('test-blrm_trial.R:1287:5'): ewoc_check issues warnings (single-agent) ──
  Error in `seq.default(main_drug_crit_dose/4, main_drug_crit_dose * 4, length = 11)`: 'from' must be a finite number
  Backtrace:
       ▆
    1. ├─OncoBayes2 (local) check_ewoc_warnings(examples$single_agent)
    2. │ ├─base::with(...) at test-blrm_trial.R:1287:4
    3. │ └─base::with.default(...)
    4. │   └─base::eval(substitute(expr), data, enclos = parent.frame())
    5. │     └─base::eval(substitute(expr), data, enclos = parent.frame())
    6. │       └─tidyr::expand_grid(...) at test-blrm_trial.R:1305:8
    7. │         └─tidyr:::grid_dots(...)
    8. │           └─rlang::eval_tidy(dot, data = mask)
    9. ├─base::seq(main_drug_crit_dose/4, main_drug_crit_dose * 4, length = 11)
   10. └─base::seq.default(...)
  ── Error ('test-blrm_trial.R:1287:5'): ewoc_check issues warnings (combo2) ─────
  Error in `seq.default(main_drug_crit_dose/4, main_drug_crit_dose * 4, length = 11)`: 'from' must be a finite number
  Backtrace:
       ▆
    1. ├─OncoBayes2 (local) check_ewoc_warnings(examples$combo2)
    2. │ ├─base::with(...) at test-blrm_trial.R:1287:4
    3. │ └─base::with.default(...)
    4. │   └─base::eval(substitute(expr), data, enclos = parent.frame())
    5. │     └─base::eval(substitute(expr), data, enclos = parent.frame())
    6. │       └─tidyr::expand_grid(...) at test-blrm_trial.R:1305:8
    7. │         └─tidyr:::grid_dots(...)
    8. │           └─rlang::eval_tidy(dot, data = mask)
    9. ├─base::seq(main_drug_crit_dose/4, main_drug_crit_dose * 4, length = 11)
   10. └─base::seq.default(...)
  ── Error ('test-blrm_trial.R:1287:5'): ewoc_check issues warnings (combo3) ─────
  Error in `seq.default(main_drug_crit_dose/4, main_drug_crit_dose * 4, length = 11)`: 'from' must be a finite number
  Backtrace:
       ▆
    1. ├─OncoBayes2 (local) check_ewoc_warnings(examples$combo3)
    2. │ ├─base::with(...) at test-blrm_trial.R:1287:4
    3. │ └─base::with.default(...)
    4. │   └─base::eval(substitute(expr), data, enclos = parent.frame())
    5. │     └─base::eval(substitute(expr), data, enclos = parent.frame())
    6. │       └─tidyr::expand_grid(...) at test-blrm_trial.R:1305:8
    7. │         └─tidyr:::grid_dots(...)
    8. │           └─rlang::eval_tidy(dot, data = mask)
    9. ├─base::seq(main_drug_crit_dose/4, main_drug_crit_dose * 4, length = 11)
   10. └─base::seq.default(...)
  
  [ FAIL 5 | WARN 84 | SKIP 30 | PASS 324 ]
  Error: Test failures
  Execution halted