Running ‘testthat.R’ [42s/43s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(heemod)
  > 
  > ## the Sys.setenv fixes a problem running tests
  > ##   with parallel processing; related to
  > ##   https://github.com/hadley/testthat/issues/86 and
  > ##   https://github.com/hadley/testthat/issues/144
  > 
  > Sys.setenv("R_TESTS" = "")
  > 
  > test_check("heemod")
  1. Error: Same results using 1 core or 2. (@test_parallel.R#7) -----------------
  STRING_PTR() can only be applied to a 'character', not a 'list'
  1: run_model_tabular(location = system.file("tabular/thr", package = "heemod"), save = FALSE, 
         overwrite = FALSE, run_psa = FALSE) at testthat/test_parallel.R:7
  2: eval_models_from_tabular(inputs, run_psa = run_psa, run_demo = run_demo)
  3: run_dsa(model_runs, inputs$param_info$dsa_params)
  4: Reduce(dplyr::bind_rows, list_res) %>% tidyr::gather_(".par_names", ".par_value", 
         dsa$variables, na.rm = TRUE) %>% dplyr::rowwise()
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: function_list[[i]](value)
  11: tidyr::gather_(., ".par_names", ".par_value", dsa$variables, na.rm = TRUE)
  12: gather_.data.frame(., ".par_names", ".par_value", dsa$variables, na.rm = TRUE)
  13: gather(data, key = !(!key_col), value = !(!value_col), !(!(!gather_cols)), na.rm = na.rm, 
         convert = convert, factor_key = factor_key)
  14: gather.data.frame(data, key = !(!key_col), value = !(!value_col), !(!(!gather_cols)), 
         na.rm = na.rm, convert = convert, factor_key = factor_key)
  15: melt_dataframe(data, id_idx - 1L, gather_idx - 1L, as.character(key_var), as.character(value_var), 
         args$attr_template, args$factorsAsStrings, as.logical(valueAsFactor), as.logical(factor_key))
  
  2. Error: run sensitivity (@test_sensitivity.R#106) ----------------------------
  STRING_PTR() can only be applied to a 'character', not a 'list'
  1: run_dsa(res2, ds) at testthat/test_sensitivity.R:106
  2: Reduce(dplyr::bind_rows, list_res) %>% tidyr::gather_(".par_names", ".par_value", 
         dsa$variables, na.rm = TRUE) %>% dplyr::rowwise()
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: function_list[[i]](value)
  9: tidyr::gather_(., ".par_names", ".par_value", dsa$variables, na.rm = TRUE)
  10: gather_.data.frame(., ".par_names", ".par_value", dsa$variables, na.rm = TRUE)
  11: gather(data, key = !(!key_col), value = !(!value_col), !(!(!gather_cols)), na.rm = na.rm, 
         convert = convert, factor_key = factor_key)
  12: gather.data.frame(data, key = !(!key_col), value = !(!value_col), !(!(!gather_cols)), 
         na.rm = na.rm, convert = convert, factor_key = factor_key)
  13: melt_dataframe(data, id_idx - 1L, gather_idx - 1L, as.character(key_var), as.character(value_var), 
         args$attr_template, args$factorsAsStrings, as.logical(valueAsFactor), as.logical(factor_key))
  
  3. Error: discount rate as a parameter works (@test_sensitivity.R#180) ---------
  STRING_PTR() can only be applied to a 'character', not a 'list'
  1: summary(run_dsa(res2, ds)) at testthat/test_sensitivity.R:180
  2: run_dsa(res2, ds)
  3: Reduce(dplyr::bind_rows, list_res) %>% tidyr::gather_(".par_names", ".par_value", 
         dsa$variables, na.rm = TRUE) %>% dplyr::rowwise()
  4: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: `_fseq`(`_lhs`)
  8: freduce(value, `_function_list`)
  9: function_list[[i]](value)
  10: tidyr::gather_(., ".par_names", ".par_value", dsa$variables, na.rm = TRUE)
  11: gather_.data.frame(., ".par_names", ".par_value", dsa$variables, na.rm = TRUE)
  12: gather(data, key = !(!key_col), value = !(!value_col), !(!(!gather_cols)), na.rm = na.rm, 
         convert = convert, factor_key = factor_key)
  13: gather.data.frame(data, key = !(!key_col), value = !(!value_col), !(!(!gather_cols)), 
         na.rm = na.rm, convert = convert, factor_key = factor_key)
  14: melt_dataframe(data, id_idx - 1L, gather_idx - 1L, as.character(key_var), as.character(value_var), 
         args$attr_template, args$factorsAsStrings, as.logical(valueAsFactor), as.logical(factor_key))
  
  4. Error: sensitivity expression inputs (@test_sensitivity.R#242) --------------
  STRING_PTR() can only be applied to a 'character', not a 'list'
  1: run_dsa(res2, ds) at testthat/test_sensitivity.R:242
  2: Reduce(dplyr::bind_rows, list_res) %>% tidyr::gather_(".par_names", ".par_value", 
         dsa$variables, na.rm = TRUE) %>% dplyr::rowwise()
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: function_list[[i]](value)
  9: tidyr::gather_(., ".par_names", ".par_value", dsa$variables, na.rm = TRUE)
  10: gather_.data.frame(., ".par_names", ".par_value", dsa$variables, na.rm = TRUE)
  11: gather(data, key = !(!key_col), value = !(!value_col), !(!(!gather_cols)), na.rm = na.rm, 
         convert = convert, factor_key = factor_key)
  12: gather.data.frame(data, key = !(!key_col), value = !(!value_col), !(!(!gather_cols)), 
         na.rm = na.rm, convert = convert, factor_key = factor_key)
  13: melt_dataframe(data, id_idx - 1L, gather_idx - 1L, as.character(key_var), as.character(value_var), 
         args$attr_template, args$factorsAsStrings, as.logical(valueAsFactor), as.logical(factor_key))
  
  5. Error: problems with output generate warnings (@test_tabular_input.R#422) ---
  STRING_PTR() can only be applied to a 'character', not a 'list'
  1: expect_warning(run_model_tabular(system.file("tabular/test/test_no_overwrite", package = "heemod"), 
         save = TRUE, overwrite = FALSE, run_psa = FALSE, run_demo = FALSE)) at testthat/test_tabular_input.R:422
  2: capture_warnings(object)
  3: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  4: run_model_tabular(system.file("tabular/test/test_no_overwrite", package = "heemod"), 
         save = TRUE, overwrite = FALSE, run_psa = FALSE, run_demo = FALSE)
  5: eval_models_from_tabular(inputs, run_psa = run_psa, run_demo = run_demo)
  6: run_dsa(model_runs, inputs$param_info$dsa_params)
  7: Reduce(dplyr::bind_rows, list_res) %>% tidyr::gather_(".par_names", ".par_value", 
         dsa$variables, na.rm = TRUE) %>% dplyr::rowwise()
  8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  9: eval(quote(`_fseq`(`_lhs`)), env, env)
  10: eval(quote(`_fseq`(`_lhs`)), env, env)
  11: `_fseq`(`_lhs`)
  12: freduce(value, `_function_list`)
  13: function_list[[i]](value)
  14: tidyr::gather_(., ".par_names", ".par_value", dsa$variables, na.rm = TRUE)
  15: gather_.data.frame(., ".par_names", ".par_value", dsa$variables, na.rm = TRUE)
  16: gather(data, key = !(!key_col), value = !(!value_col), !(!(!gather_cols)), na.rm = na.rm, 
         convert = convert, factor_key = factor_key)
  17: gather.data.frame(data, key = !(!key_col), value = !(!value_col), !(!(!gather_cols)), 
         na.rm = na.rm, convert = convert, factor_key = factor_key)
  18: melt_dataframe(data, id_idx - 1L, gather_idx - 1L, as.character(key_var), as.character(value_var), 
         args$attr_template, args$factorsAsStrings, as.logical(valueAsFactor), as.logical(factor_key))
  
  6. Error: Running model from files works. (@test_tabular_input.R#721) ----------
  STRING_PTR() can only be applied to a 'character', not a 'list'
  1: run_model_tabular(location = system.file("tabular/thr", package = "heemod"), run_psa = TRUE, 
         run_demo = TRUE, save = TRUE, overwrite = TRUE) at testthat/test_tabular_input.R:721
  2: eval_models_from_tabular(inputs, run_psa = run_psa, run_demo = run_demo)
  3: run_dsa(model_runs, inputs$param_info$dsa_params)
  4: Reduce(dplyr::bind_rows, list_res) %>% tidyr::gather_(".par_names", ".par_value", 
         dsa$variables, na.rm = TRUE) %>% dplyr::rowwise()
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: function_list[[i]](value)
  11: tidyr::gather_(., ".par_names", ".par_value", dsa$variables, na.rm = TRUE)
  12: gather_.data.frame(., ".par_names", ".par_value", dsa$variables, na.rm = TRUE)
  13: gather(data, key = !(!key_col), value = !(!value_col), !(!(!gather_cols)), na.rm = na.rm, 
         convert = convert, factor_key = factor_key)
  14: gather.data.frame(data, key = !(!key_col), value = !(!value_col), !(!(!gather_cols)), 
         na.rm = na.rm, convert = convert, factor_key = factor_key)
  15: melt_dataframe(data, id_idx - 1L, gather_idx - 1L, as.character(key_var), as.character(value_var), 
         args$attr_template, args$factorsAsStrings, as.logical(valueAsFactor), as.logical(factor_key))
  
  testthat results ================================================================
  OK: 342 SKIPPED: 0 FAILED: 6
  1. Error: Same results using 1 core or 2. (@test_parallel.R#7) 
  2. Error: run sensitivity (@test_sensitivity.R#106) 
  3. Error: discount rate as a parameter works (@test_sensitivity.R#180) 
  4. Error: sensitivity expression inputs (@test_sensitivity.R#242) 
  5. Error: problems with output generate warnings (@test_tabular_input.R#422) 
  6. Error: Running model from files works. (@test_tabular_input.R#721) 
  
  Error: testthat unit tests failed
  Execution halted