Running 'testthat.R' [10m]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > library(rstansim)
  Loading required package: Rcpp
  > 
  > test_check("rstansim")
  -- 1. Error: stansim test; cache FALSE, loo FALSE (@test-stansim_external_functi
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`rstansim:::single_sim` = function(...) {
         readRDS("objects/test_stansim_uni_single.rds")
     }, `rstan::stan_model` = function(...) {
         readRDS("objects/test_stanmodel.rds")
     }, test_stan_args <- list(file = "data-raw/8schools.stan", iter = 500, chains = 4), 
         test_sim_data <- dir("data-raw/data", full.names = TRUE), catch <- capture_output(stansim_output <- fit_models(stan_args = test_stan_args, 
             sim_data = test_sim_data, cache = FALSE, sim_name = "stansim no cache & loo test", 
             seed = 500)), expect_type(stansim_output, "list"), expect_equal(length(stansim_output), 
             10), expect_s3_class(stansim_output, "stansim_simulation"), expect_equal(names(stansim_output), 
             c("sim_name", "start_time", "end_time", "model_name", "model_code", "seed", 
                 "instances", "data", "raw_call", "refitted")), expect_equal(stansim_output$sim_name, 
             "stansim no cache & loo test"), is_date <- function(mydate, date.format = "%d/%m/%y") {
             tryCatch(!is.na(as.Date(mydate, date.format, tz = "UTC")), error = function(err) FALSE)
         }, expect_true(is_date(stansim_output$start_time)), expect_true(is_date(stansim_output$end_time)), 
         expect_equal(stansim_output$model_name, "8schools"), expect_equal(nchar(stansim_output$model_code), 
             418), expect_equal(stansim_output$seed, 500), test_instances <- stansim_output$instances, 
         instance_check <- function(instance) {
             expect_type(instance, "list")
             expect_equal(length(instance), 7)
             expect_true(grepl("data-raw/data/schoolsdat\\d.rds", instance$data_name))
             expect_true(is_date(instance$ran_at))
             expect_equal(dim(instance$elapsed_time), c(4, 2))
             expect_equal(colnames(instance$elapsed_time), c("warmup", "sample"))
             expect_type(instance$stan_inits, "list")
             expect_equal(length(instance$stan_inits), 4)
             ident <- function(...) {
                 args <- c(...)
                 if (length(args) > 2L) {
                     out <- c(identical(args[1], args[2]), ident(args[-1]))
                 }
                 else {
                     out <- identical(args[1], args[2])
                 }
                 return(all(out))
             }
             expect_true(ident(instance$stan_args[[1]]$iter, instance$stan_args[[2]]$iter, 
                 instance$stan_args[[3]]$iter, instance$stan_args[[4]]$iter))
             expect_true(ident(instance$stan_args[[1]]$thin, instance$stan_args[[2]]$thin, 
                 instance$stan_args[[3]]$thin, instance$stan_args[[4]]$thin))
             expect_true(ident(instance$stan_args[[1]]$warmup, instance$stan_args[[2]]$warmup, 
                 instance$stan_args[[3]]$warmup, instance$stan_args[[4]]$warmup))
             expect_true(ident(instance$stan_args[[1]]$init, instance$stan_args[[2]]$init, 
                 instance$stan_args[[3]]$init, instance$stan_args[[4]]$init))
             expect_true(ident(instance$stan_args[[1]]$algorithm, instance$stan_args[[2]]$algorithm, 
                 instance$stan_args[[3]]$algorithm, instance$stan_args[[4]]$algorithm))
             expect_true(ident(instance$stan_args[[1]]$check_unknown_args, instance$stan_args[[2]]$check_unknown_args, 
                 instance$stan_args[[3]]$check_unknown_args, instance$stan_args[[4]]$check_unknown_args))
             expect_true(ident(instance$stan_args[[1]]$sampling, instance$stan_args[[2]]$sampling, 
                 instance$stan_args[[3]]$sampling, instance$stan_args[[4]]$sampling))
             expect_type(instance$seed, "integer")
             warn_regex <- paste0("There were 2 divergent transitions after warmup.", 
                 " Increasing adapt_delta above 0.8 may help. ", "See\nhttp://mc-stan.org/misc/warnings.html#", 
                 "divergent-transitions-after-warmup")
         }, lapply(test_instances, instance_check)) at testthat/test-stansim_external_functions.R:7
  2: eval(expression, parent.frame())
  3: eval(expression, parent.frame())
  4: capture_output(stansim_output <- fit_models(stan_args = test_stan_args, sim_data = test_sim_data, 
         cache = FALSE, sim_name = "stansim no cache & loo test", seed = 500))
  5: capture_output_lines(code, print, width = width)
  6: eval_with_output(code, print = print, width = width)
  7: withr::with_output_sink(temp, withVisible(code))
  8: force(code)
  9: withVisible(code)
  10: fit_models(stan_args = test_stan_args, sim_data = test_sim_data, cache = FALSE, sim_name = "stansim no cache & loo test", 
         seed = 500)
  11: doRNG::`%dorng%`
  12: getExportedValue(pkg, name)
  13: asNamespace(ns)
  14: getNamespace(ns)
  15: tryCatch(loadNamespace(name), error = function(e) stop(e))
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: value[[3L]](cond)
  
  -- 2. Error: stansim test; cache TRUE, loo FALSE (@test-stansim_external_functio
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: with_mock(`rstansim:::single_sim` = function(...) {
         readRDS("objects/test_stansim_uni_single.rds")
     }, `rstan::stan_model` = function(...) {
         readRDS("objects/test_stanmodel.rds")
     }, test_stan_args <- list(file = "data-raw/8schools.stan", iter = 500, chains = 4), 
         test_sim_data <- dir("data-raw/data", full.names = TRUE), catch <- capture_output(stansim_output <- fit_models(stan_args = test_stan_args, 
             sim_data = test_sim_data, cache = TRUE, sim_name = "stansim no loo test", 
             seed = 500)), expect_type(stansim_output, "list"), expect_equal(length(stansim_output), 
             10), expect_s3_class(stansim_output, "stansim_simulation"), expect_equal(names(stansim_output), 
             c("sim_name", "start_time", "end_time", "model_name", "model_code", "seed", 
                 "instances", "data", "raw_call", "refitted")), expect_equal(stansim_output$sim_name, 
             "stansim no loo test"), is_date <- function(mydate, date.format = "%d/%m/%y") {
             tryCatch(!is.na(as.Date(mydate, date.format, tz = "UTC")), error = function(err) FALSE)
         }, expect_true(is_date(stansim_output$start_time)), expect_true(is_date(stansim_output$end_time)), 
         expect_equal(stansim_output$model_name, "8schools"), expect_equal(nchar(stansim_output$model_code), 
             418), expect_equal(stansim_output$seed, 500), test_instances <- stansim_output$instances, 
         instance_check <- function(instance) {
             expect_type(instance, "list")
             expect_equal(length(instance), 7)
             expect_true(grepl("data-raw/data/schoolsdat\\d.rds", instance$data_name))
             expect_true(is_date(instance$ran_at))
             expect_equal(dim(instance$elapsed_time), c(4, 2))
             expect_equal(colnames(instance$elapsed_time), c("warmup", "sample"))
             expect_type(instance$stan_inits, "list")
             expect_equal(length(instance$stan_inits), 4)
             ident <- function(...) {
                 args <- c(...)
                 if (length(args) > 2L) {
                     out <- c(identical(args[1], args[2]), ident(args[-1]))
                 }
                 else {
                     out <- identical(args[1], args[2])
                 }
                 return(all(out))
             }
             expect_true(ident(instance$stan_args[[1]]$iter, instance$stan_args[[2]]$iter, 
                 instance$stan_args[[3]]$iter, instance$stan_args[[4]]$iter))
             expect_true(ident(instance$stan_args[[1]]$thin, instance$stan_args[[2]]$thin, 
                 instance$stan_args[[3]]$thin, instance$stan_args[[4]]$thin))
             expect_true(ident(instance$stan_args[[1]]$warmup, instance$stan_args[[2]]$warmup, 
                 instance$stan_args[[3]]$warmup, instance$stan_args[[4]]$warmup))
             expect_true(ident(instance$stan_args[[1]]$init, instance$stan_args[[2]]$init, 
                 instance$stan_args[[3]]$init, instance$stan_args[[4]]$init))
             expect_true(ident(instance$stan_args[[1]]$algorithm, instance$stan_args[[2]]$algorithm, 
                 instance$stan_args[[3]]$algorithm, instance$stan_args[[4]]$algorithm))
             expect_true(ident(instance$stan_args[[1]]$check_unknown_args, instance$stan_args[[2]]$check_unknown_args, 
                 instance$stan_args[[3]]$check_unknown_args, instance$stan_args[[4]]$check_unknown_args))
             expect_true(ident(instance$stan_args[[1]]$sampling, instance$stan_args[[2]]$sampling, 
                 instance$stan_args[[3]]$sampling, instance$stan_args[[4]]$sampling))
             expect_type(instance$seed, "integer")
             warn_regex <- paste0("There were 2 divergent transitions after warmup.", 
                 " Increasing adapt_delta above 0.8 may help. ", "See\nhttp://mc-stan.org/misc/warnings.html#", 
                 "divergent-transitions-after-warmup")
         }, lapply(test_instances, instance_check), expect_false(dir.exists(".cache"))) at testthat/test-stansim_external_functions.R:200
  2: eval(expression, parent.frame())
  3: eval(expression, parent.frame())
  4: capture_output(stansim_output <- fit_models(stan_args = test_stan_args, sim_data = test_sim_data, 
         cache = TRUE, sim_name = "stansim no loo test", seed = 500))
  5: capture_output_lines(code, print, width = width)
  6: eval_with_output(code, print = print, width = width)
  7: withr::with_output_sink(temp, withVisible(code))
  8: force(code)
  9: withVisible(code)
  10: fit_models(stan_args = test_stan_args, sim_data = test_sim_data, cache = TRUE, sim_name = "stansim no loo test", 
         seed = 500)
  11: doRNG::`%dorng%`
  12: getExportedValue(pkg, name)
  13: asNamespace(ns)
  14: getNamespace(ns)
  15: tryCatch(loadNamespace(name), error = function(e) stop(e))
  16: tryCatchList(expr, classes, parentenv, handlers)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: value[[3L]](cond)
  
  -- 3. Error: stansim test with stansim_data object; cache FALSE, loo FALSE (@tes
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: capture_output(stansim_output <- fit_models(stan_args = test_stan_args, sim_data = ss_data, 
         cache = FALSE, parameters = c("alpha", "beta", "sigma"), sim_name = "stansim no cache & loo test", 
         seed = 500)) at testthat/test-stansim_external_functions.R:821
  2: capture_output_lines(code, print, width = width)
  3: eval_with_output(code, print = print, width = width)
  4: withr::with_output_sink(temp, withVisible(code))
  5: force(code)
  6: withVisible(code)
  7: fit_models(stan_args = test_stan_args, sim_data = ss_data, cache = FALSE, parameters = c("alpha", 
         "beta", "sigma"), sim_name = "stansim no cache & loo test", seed = 500)
  8: doRNG::`%dorng%`
  9: getExportedValue(pkg, name)
  10: asNamespace(ns)
  11: getNamespace(ns)
  12: tryCatch(loadNamespace(name), error = function(e) stop(e))
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  15: value[[3L]](cond)
  
  -- 4. Failure: stansim test with stansim_data object; cache TRUE, loo FALSE (@te
  dir.exists("testdir") isn't false.
  
  -- 5. Error: stansim test with stansim_data object; cache TRUE, loo FALSE (@test
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: capture_output(stansim_output <- fit_models(stan_args = test_stan_args, sim_data = ss_data, 
         cache = TRUE, parameters = c("alpha", "beta", "sigma"), sim_name = "stansim no cache & loo test", 
         seed = 500)) at testthat/test-stansim_external_functions.R:1010
  2: capture_output_lines(code, print, width = width)
  3: eval_with_output(code, print = print, width = width)
  4: withr::with_output_sink(temp, withVisible(code))
  5: force(code)
  6: withVisible(code)
  7: fit_models(stan_args = test_stan_args, sim_data = ss_data, cache = TRUE, parameters = c("alpha", 
         "beta", "sigma"), sim_name = "stansim no cache & loo test", seed = 500)
  8: doRNG::`%dorng%`
  9: getExportedValue(pkg, name)
  10: asNamespace(ns)
  11: getNamespace(ns)
  12: tryCatch(loadNamespace(name), error = function(e) stop(e))
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  15: value[[3L]](cond)
  
  -- 6. Failure: simulate_data returns correct output (@test-stansim_simulate.R#12
  dir.exists("testdir") isn't false.
  
  == testthat results  ===========================================================
  OK: 882 SKIPPED: 0 FAILED: 6
  1. Error: stansim test; cache FALSE, loo FALSE (@test-stansim_external_functions.R#7) 
  2. Error: stansim test; cache TRUE, loo FALSE (@test-stansim_external_functions.R#200) 
  3. Error: stansim test with stansim_data object; cache FALSE, loo FALSE (@test-stansim_external_functions.R#821) 
  4. Failure: stansim test with stansim_data object; cache TRUE, loo FALSE (@test-stansim_external_functions.R#992) 
  5. Error: stansim test with stansim_data object; cache TRUE, loo FALSE (@test-stansim_external_functions.R#1010) 
  6. Failure: simulate_data returns correct output (@test-stansim_simulate.R#129) 
  
  Error: testthat unit tests failed
  In addition: Warning message:
  closing unused connection 6 (<-CRANwin.fb05.statistik.uni-dortmund.de:11490) 
  Execution halted