Running ‘testthat.R’ [53s/55s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(xpose)
  Loading required package: ggplot2
  
  Attaching package: 'xpose'
  
  The following object is masked from 'package:stats':
  
      filter
  
  > 
  > test_check("xpose")
  ── 1. Error: (unknown) (@test-console_outputs.R#4)  ────────────────────────────
  $ operator is invalid for atomic vectors
  1: xpdb_ex_pk %>% vpc_data(opt = vpc_opt(n_bins = 2), quiet = TRUE) %>% filter(ID == 
         110, .source = "data") %>% filter(ITERATION == 0, .source = "ext") %>% filter(bin == 
         2, .problem = 3, .source = "special", .where = "vpc_dat") at testthat/test-console_outputs.R:4
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: vpc_data(., opt = vpc_opt(n_bins = 2), quiet = TRUE)
  9: vpc::vpc(obs = obs_data, sim = sim_data, psn_folder = NULL, bins = opt$bins, n_bins = opt$n_bins, 
         bin_mid = opt$bin_mid, obs_cols = obs_cols, sim_cols = sim_cols, stratify = stratify, 
         pred_corr = opt$pred_corr, pred_corr_lower_bnd = opt$pred_corr_lower_bnd, pi = opt$pi, 
         ci = opt$ci, uloq = opt$uloq, lloq = opt$lloq, smooth = FALSE, vpcdb = TRUE, 
         verbose = !quiet)
  10: add_sim_index_number(sim, id = "id", sim_label = sim_cols$sim)
  
  ── 2. Error: (unknown) (@test-edits.R#17)  ─────────────────────────────────────
  $ operator is invalid for atomic vectors
  1: vpc_data(xpdb_ex_pk, opt = vpc_opt(n_bins = 2), quiet = TRUE) at testthat/test-edits.R:17
  2: vpc::vpc(obs = obs_data, sim = sim_data, psn_folder = NULL, bins = opt$bins, n_bins = opt$n_bins, 
         bin_mid = opt$bin_mid, obs_cols = obs_cols, sim_cols = sim_cols, stratify = stratify, 
         pred_corr = opt$pred_corr, pred_corr_lower_bnd = opt$pred_corr_lower_bnd, pi = opt$pi, 
         ci = opt$ci, uloq = opt$uloq, lloq = opt$lloq, smooth = FALSE, vpcdb = TRUE, 
         verbose = !quiet)
  3: add_sim_index_number(sim, id = "id", sim_label = sim_cols$sim)
  
  ── 3. Error: (unknown) (@test-vpc.R#17)  ───────────────────────────────────────
  $ operator is invalid for atomic vectors
  1: xpdb_ex_pk %>% vpc_data(opt = vpc_opt(n_bins = 3, lloq = 0.1), quiet = TRUE) %>% 
         vpc_data(vpc_type = "cens", opt = vpc_opt(n_bins = 3, lloq = 0.4), quiet = TRUE) at testthat/test-vpc.R:17
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: vpc_data(., opt = vpc_opt(n_bins = 3, lloq = 0.1), quiet = TRUE)
  9: vpc::vpc(obs = obs_data, sim = sim_data, psn_folder = NULL, bins = opt$bins, n_bins = opt$n_bins, 
         bin_mid = opt$bin_mid, obs_cols = obs_cols, sim_cols = sim_cols, stratify = stratify, 
         pred_corr = opt$pred_corr, pred_corr_lower_bnd = opt$pred_corr_lower_bnd, pi = opt$pi, 
         ci = opt$ci, uloq = opt$uloq, lloq = opt$lloq, smooth = FALSE, vpcdb = TRUE, 
         verbose = !quiet)
  10: add_sim_index_number(sim, id = "id", sim_label = sim_cols$sim)
  
  ── 4. Error: (unknown) (@test-xpdb_access.R#4)  ────────────────────────────────
  $ operator is invalid for atomic vectors
  1: xpdb_ex_pk %>% vpc_data(quiet = TRUE) %>% vpc_data(vpc_type = "censored", opt = vpc_opt(lloq = 0.4), 
         quiet = TRUE) at testthat/test-xpdb_access.R:4
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: vpc_data(., quiet = TRUE)
  9: vpc::vpc(obs = obs_data, sim = sim_data, psn_folder = NULL, bins = opt$bins, n_bins = opt$n_bins, 
         bin_mid = opt$bin_mid, obs_cols = obs_cols, sim_cols = sim_cols, stratify = stratify, 
         pred_corr = opt$pred_corr, pred_corr_lower_bnd = opt$pred_corr_lower_bnd, pi = opt$pi, 
         ci = opt$ci, uloq = opt$uloq, lloq = opt$lloq, smooth = FALSE, vpcdb = TRUE, 
         verbose = !quiet)
  10: add_sim_index_number(sim, id = "id", sim_label = sim_cols$sim)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 425 SKIPPED: 4 FAILED: 4
  1. Error: (unknown) (@test-console_outputs.R#4) 
  2. Error: (unknown) (@test-edits.R#17) 
  3. Error: (unknown) (@test-vpc.R#17) 
  4. Error: (unknown) (@test-xpdb_access.R#4) 
  
  Error: testthat unit tests failed
  Execution halted