Running ‘testthat.R’ [15s/16s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS"="")
  > library(testthat)
  > library(spartan)
  Loading required package: randomForest
  randomForest 4.6-14
  Type rfNews() to see new features/changes/bug fixes.
  Loading required package: e1071
  > options(warn = 2)
  > test_check("spartan", report="summary")
  Test of Spartan Consistency Analysis: ..S.........................................................................................
  Test of A-Test calculation utilities: ..........
  Test of Spartan eFAST Analysis: ..................................................................................................................12..trying URL 'http://www.kieranalden.info/spartan/test_data/netlogo_efast.zip'
  Content type 'application/zip' length 505212 bytes (493 KB)
  ==================================================
  downloaded 493 KB
  
  ....3
  Test of Spartan eFAST Sampling: ......
  Test of Spartan Netlogo eFAST Sampling: S
  Test of Spartan Emulation Sensitivity Analysis: SS
  Testing Spartan Utilities Class: .
  Test of Spartan Evolution Utilities: SS.......
  Test of Error Checking of Spartan Function Arguments: .............................................................................................................................
  Test of Spartan LHC Analysis: .....................................................................................................
  Testing Spartan LHC Plotting Utilities Class: 45........................................
  Test of Spartan Latin-Hypercube Sampling: .....S............
  Test of Spartan Netlogo Latin-Hypercube Sampling: SS
  Test Neural Network Utilities: SSSSSSSSSS
  Test of Spartan Robustness Analysis: ................................................................6789
  Test of Spartan Robustness Sampling: ........S
  Testing Spartan Utilities Class: ....................................
  
  ══ Skipped ═════════════════════════════════════════════════════════════════════
  1. read_simulation_results (@test_aleatory_analysis.R#19) - On CRAN
  
  2. efast_generate_sample_netlogo (@test_efast_sampling_netlogo.R#7) - On CRAN
  
  3. emulate_efast_sampled_parameters  (@test_emulation_sensitivity_analysis.R#6) - On CRAN
  
  4. emulate_lhc_sampled_parameters (@test_emulation_sensitivity_analysis.R#42) - On CRAN
  
  5. emulator_parameter_evolution (@test_evolution.R#6) - On CRAN
  
  6. nsga2_set_user_params (@test_evolution.R#40) - On CRAN
  
  7. sample_parameter_space (@test_lhc_sampling.R#17) - On CRAN
  
  8. process_netlogo_parameter_range_info (@test_lhc_sampling_netlogo.R#6) - On CRAN
  
  9. lhc_generate_lhc_sample_netlogo (@test_lhc_sampling_netlogo.R#21) - On CRAN
  
  10. determine_optimal_neural_network_structure (@test_neural_network_utilities.R#7) - On CRAN
  
  11. kfoldCrossValidation (@test_neural_network_utilities.R#32) - On CRAN
  
  12. analysenetwork_structures (@test_neural_network_utilities.R#55) - On CRAN
  
  13. createAndEvaluateFolds (@test_neural_network_utilities.R#81) - On CRAN
  
  14. updateErrorForStructure (@test_neural_network_utilities.R#107) - On CRAN
  
  15. select_suitable_structure (@test_neural_network_utilities.R#137) - On CRAN
  
  16. calculate_fold_MSE (@test_neural_network_utilities.R#154) - On CRAN
  
  17. createTrainingFold (@test_neural_network_utilities.R#190) - On CRAN
  
  18. createTestFold (@test_neural_network_utilities.R#213) - On CRAN
  
  19. create_neural_network (@test_neural_network_utilities.R#236) - On CRAN
  
  20. oat_generate_netlogo_behaviour_space_XML (@test_robustness_sampling.R#56) - On CRAN
  
  ══ Failed ══════════════════════════════════════════════════════════════════════
  ── 1. Error: efast_run_Analysis_overTime (@test_efast_analysis.R#325)  ─────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: efast_run_Analysis(getwd(), c("Velocity", "Displacement"), c("BindProbability", "ChemoThreshold", 
         "ChemoUpperLinearAdjust", "ChemoLowerLinearAdjust", "VCAMProbabilityThreshold", 
         "VCAMSlope", "Dummy"), 2, 65, 1:2, 0.95, GRAPH_FLAG = TRUE, "efast_summary.csv", 
         TIMEPOINTS = c(12, 60)) at testthat/test_efast_analysis.R:325
  2: efast_run_Analysis_overTime(FILEPATH, MEASURES, PARAMETERS, NUMCURVES, NUMSAMPLES, 
         OUTPUTMEASURES_TO_TTEST, TTEST_CONF_INT, GRAPH_FLAG, EFASTRESULTFILENAME, TIMEPOINTS, 
         TIMEPOINTSCALE, output_types)
  3: efast_run_Analysis(FILEPATH, MEASURES, PARAMETERS, NUMCURVES, NUMSAMPLES, OUTPUTMEASURES_TO_TTEST, 
         TTEST_CONF_INT, GRAPH_FLAG, efastresultfile_full, TIMEPOINTS = NULL, TIMEPOINTSCALE, 
         GRAPHTIME = current_time, check_done = TRUE)
  4: efast_graph_Results(FILEPATH, PARAMETERS, sensitivities$si, sensitivities$sti, sensitivities$errors_si, 
         sensitivities$errors_sti, MEASURES, GRAPHTIME, TIMEPOINTSCALE, output_types)
  5: ggplot2::ggsave(file.path(RESULTS_FILE_PATH, paste0(MEASURES[MEASURE], TIMEPOINT, 
         ".", out)))
  6: grid.draw(plot)
  7: grid.draw.ggplot(plot)
  8: print(x)
  9: print.ggplot(x)
  10: ggplot_gtable(data)
  ...
  23: pushvpgp(x)
  24: pushgrobvp(x$vp)
  25: pushgrobvp.viewport(x$vp)
  26: pushViewport(vp, recording = FALSE)
  27: lapply(vps, push.vp, recording)
  28: FUN(X[[i]], ...)
  29: push.vp.vpTree(X[[i]], ...)
  30: push.vp(vp$parent, recording)
  31: push.vp.viewport(vp$parent, recording)
  32: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 2. Error: efast_run_Analysis (@test_efast_analysis.R#384)  ──────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: efast_run_Analysis(getwd(), c("Velocity", "Displacement"), c("BindProbability", "ChemoThreshold", 
         "ChemoUpperLinearAdjust", "ChemoLowerLinearAdjust", "VCAMProbabilityThreshold", 
         "VCAMSlope", "Dummy"), 2, 65, 1:2, 0.95, GRAPH_FLAG = TRUE, "efast_summary.csv") at testthat/test_efast_analysis.R:384
  2: efast_graph_Results(FILEPATH, PARAMETERS, sensitivities$si, sensitivities$sti, sensitivities$errors_si, 
         sensitivities$errors_sti, MEASURES, GRAPHTIME, TIMEPOINTSCALE, output_types)
  3: ggplot2::ggsave(file.path(RESULTS_FILE_PATH, paste0(MEASURES[MEASURE], TIMEPOINT, 
         ".", out)))
  4: grid.draw(plot)
  5: grid.draw.ggplot(plot)
  6: print(x)
  7: print.ggplot(x)
  8: ggplot_gtable(data)
  9: ggplot_gtable.ggplot_built(data)
  10: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  ...
  21: pushvpgp(x)
  22: pushgrobvp(x$vp)
  23: pushgrobvp.viewport(x$vp)
  24: pushViewport(vp, recording = FALSE)
  25: lapply(vps, push.vp, recording)
  26: FUN(X[[i]], ...)
  27: push.vp.vpTree(X[[i]], ...)
  28: push.vp(vp$parent, recording)
  29: push.vp.viewport(vp$parent, recording)
  30: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 3. Error: ploteFASTSiFromTimepointFiles (@test_efast_analysis.R#469)  ───────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: efast_run_Analysis(getwd(), c("Velocity", "Displacement"), c("BindProbability", "ChemoThreshold", 
         "ChemoUpperLinearAdjust", "ChemoLowerLinearAdjust", "VCAMProbabilityThreshold", 
         "VCAMSlope", "Dummy"), 2, 65, 1:2, 0.95, GRAPH_FLAG = TRUE, "efast_summary.csv", 
         TIMEPOINTS = c(12, 60)) at testthat/test_efast_analysis.R:469
  2: efast_run_Analysis_overTime(FILEPATH, MEASURES, PARAMETERS, NUMCURVES, NUMSAMPLES, 
         OUTPUTMEASURES_TO_TTEST, TTEST_CONF_INT, GRAPH_FLAG, EFASTRESULTFILENAME, TIMEPOINTS, 
         TIMEPOINTSCALE, output_types)
  3: efast_run_Analysis(FILEPATH, MEASURES, PARAMETERS, NUMCURVES, NUMSAMPLES, OUTPUTMEASURES_TO_TTEST, 
         TTEST_CONF_INT, GRAPH_FLAG, efastresultfile_full, TIMEPOINTS = NULL, TIMEPOINTSCALE, 
         GRAPHTIME = current_time, check_done = TRUE)
  4: efast_graph_Results(FILEPATH, PARAMETERS, sensitivities$si, sensitivities$sti, sensitivities$errors_si, 
         sensitivities$errors_sti, MEASURES, GRAPHTIME, TIMEPOINTSCALE, output_types)
  5: ggplot2::ggsave(file.path(RESULTS_FILE_PATH, paste0(MEASURES[MEASURE], TIMEPOINT, 
         ".", out)))
  6: grid.draw(plot)
  7: grid.draw.ggplot(plot)
  8: print(x)
  9: print.ggplot(x)
  10: ggplot_gtable(data)
  ...
  23: pushvpgp(x)
  24: pushgrobvp(x$vp)
  25: pushgrobvp.viewport(x$vp)
  26: pushViewport(vp, recording = FALSE)
  27: lapply(vps, push.vp, recording)
  28: FUN(X[[i]], ...)
  29: push.vp.vpTree(X[[i]], ...)
  30: push.vp(vp$parent, recording)
  31: push.vp.viewport(vp$parent, recording)
  32: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 4. Error: lhc_graphMeasuresForParameterChange (@test_lhc_plotting.R#15)  ────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: lhc_graphMeasuresForParameterChange(getwd(), c("thresholdBindProbability", "chemoThreshold", 
         "chemoUpperLinearAdjust", "chemoLowerLinearAdjust", "maxVCAMeffectProbabilityCutoff", 
         "vcamSlope"), c("Velocity", "Displacement"), c("microns/min", "microns"), "Test_Cor_Coeffs.csv", 
         "LHC_Results.csv", OUTPUT_TYPE = c("PDF", "PNG")) at testthat/test_lhc_plotting.R:15
  2: output_ggplot_graph(titles$file, OUTPUT_TYPE, make_lhc_plot(data_to_plot, titles))
  3: ggsave(paste(GRAPHFILE, ".pdf", sep = ""), plot = output_graph, width = 4, height = 4)
  4: grid.draw(plot)
  5: grid.draw.ggplot(plot)
  6: print(x)
  7: print.ggplot(x)
  8: grid.draw(gtable)
  9: grid.draw.gTree(gtable)
  10: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  11: drawGTree(x)
  12: preDraw(x)
  13: preDraw.gTree(x)
  14: pushvpgp(x)
  15: pushgrobvp(x$vp)
  16: pushgrobvp.viewport(x$vp)
  17: pushViewport(vp, recording = FALSE)
  18: lapply(vps, push.vp, recording)
  19: FUN(X[[i]], ...)
  20: push.vp.viewport(X[[i]], ...)
  21: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 5. Error: lhc_graphMeasuresForParameterChange_overTime (@test_lhc_plotting.R#
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: lhc_graphMeasuresForParameterChange(getwd(), c("thresholdBindProbability", "chemoThreshold", 
         "chemoUpperLinearAdjust", "chemoLowerLinearAdjust", "maxVCAMeffectProbabilityCutoff", 
         "vcamSlope"), c("Velocity", "Displacement"), c("microns/min", "microns"), "Test_Cor_Coeffs.csv", 
         "LHC_Results.csv", OUTPUT_TYPE = c("PDF", "PNG"), TIMEPOINTS = c(12, 36), TIMEPOINTSCALE = "Hours") at testthat/test_lhc_plotting.R:92
  2: lhc_graphMeasuresForParameterChange_overTime(FILEPATH, PARAMETERS, MEASURES, MEASURE_SCALE, 
         CORCOEFFSOUTPUTFILE, LHCSUMMARYFILENAME, OUTPUT_TYPE, TIMEPOINTS, TIMEPOINTSCALE, 
         GRAPHTIME)
  3: lhc_graphMeasuresForParameterChange(FILEPATH, PARAMETERS, MEASURES, MEASURE_SCALE, 
         corcoeffs_output_full, lhcsummary_full, TIMEPOINTS = NULL, TIMEPOINTSCALE = TIMEPOINTSCALE, 
         GRAPHTIME = current_time, check_done = TRUE)
  4: output_ggplot_graph(titles$file, OUTPUT_TYPE, make_lhc_plot(data_to_plot, titles))
  5: ggsave(paste(GRAPHFILE, ".pdf", sep = ""), plot = output_graph, width = 4, height = 4)
  6: grid.draw(plot)
  7: grid.draw.ggplot(plot)
  8: print(x)
  9: print.ggplot(x)
  10: grid.draw(gtable)
  ...
  14: preDraw(x)
  15: preDraw.gTree(x)
  16: pushvpgp(x)
  17: pushgrobvp(x$vp)
  18: pushgrobvp.viewport(x$vp)
  19: pushViewport(vp, recording = FALSE)
  20: lapply(vps, push.vp, recording)
  21: FUN(X[[i]], ...)
  22: push.vp.viewport(X[[i]], ...)
  23: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 6. Error: oat_graphATestsForSampleSize (@test_robustness_analysis.R#296)  ───
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: oat_graphATestsForSampleSize(getwd(), c("chemoLowerLinearAdjust", "chemoUpperLinearAdjust"), 
         c("Velocity", "Displacement"), 0.23, "EgSet_ATests.csv", c(0.04, 0.2), PMIN = c(0.015, 
             0.1), PMAX = c(0.08, 0.5), PINC = c(0.005, 0.05), PARAMVALS = NULL) at testthat/test_robustness_analysis.R:296
  2: ggplot2::ggsave(file.path(FILEPATH, paste0(PARAMETERS[PARAM], ".", out)))
  3: grid.draw(plot)
  4: grid.draw.ggplot(plot)
  5: print(x)
  6: print.ggplot(x)
  7: ggplot_gtable(data)
  8: ggplot_gtable.ggplot_built(data)
  9: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  10: guides_gengrob(gdefs, theme)
  ...
  20: pushvpgp(x)
  21: pushgrobvp(x$vp)
  22: pushgrobvp.viewport(x$vp)
  23: pushViewport(vp, recording = FALSE)
  24: lapply(vps, push.vp, recording)
  25: FUN(X[[i]], ...)
  26: push.vp.vpTree(X[[i]], ...)
  27: push.vp(vp$parent, recording)
  28: push.vp.viewport(vp$parent, recording)
  29: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 7. Error: oat_graphATestsForSampleSize_overTime (@test_robustness_analysis.R#
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: oat_graphATestsForSampleSize(getwd(), c("chemoLowerLinearAdjust", "chemoUpperLinearAdjust"), 
         c("Velocity", "Displacement"), 0.23, "EgSet_ATests.csv", c(0.04, 0.2), PMIN = c(0.015, 
             0.1), PMAX = c(0.08, 0.5), PINC = c(0.005, 0.05), PARAMVALS = NULL, TIMEPOINTS = c(12, 
             36), TIMEPOINTSCALE = "Hours") at testthat/test_robustness_analysis.R:326
  2: oat_graphATestsForSampleSize(FILEPATH, PARAMETERS, MEASURES, ATESTSIGLEVEL, ATESTRESULTFILENAME_FULL, 
         BASELINE, PMIN, PMAX, PINC, PARAMVALS, TIMEPOINTS = current_time, TIMEPOINTSCALE = TIMEPOINTSCALE)
  3: ggplot2::ggsave(file.path(FILEPATH, paste0(PARAMETERS[PARAM], "_", TIMEPOINTS, ".", 
         out)))
  4: grid.draw(plot)
  5: grid.draw.ggplot(plot)
  6: print(x)
  7: print.ggplot(x)
  8: ggplot_gtable(data)
  9: ggplot_gtable.ggplot_built(data)
  10: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  ...
  21: pushvpgp(x)
  22: pushgrobvp(x$vp)
  23: pushgrobvp.viewport(x$vp)
  24: pushViewport(vp, recording = FALSE)
  25: lapply(vps, push.vp, recording)
  26: FUN(X[[i]], ...)
  27: push.vp.vpTree(X[[i]], ...)
  28: push.vp(vp$parent, recording)
  29: push.vp.viewport(vp$parent, recording)
  30: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 8. Error: oat_plotResultDistribution (@test_robustness_analysis.R#352)  ─────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: oat_plotResultDistribution(getwd(), c("chemoLowerLinearAdjust", "chemoUpperLinearAdjust"), 
         c("Velocity", "Displacement"), c("microns/min", "microns"), "robustness_result.csv", 
         c(0.04, 0.2), PMIN = c(0.015, 0.1), PMAX = c(0.08, 0.5), PINC = c(0.005, 0.05), 
         PARAMVALS = NULL) at testthat/test_robustness_analysis.R:352
  2: ggplot2::ggsave(file.path(FILEPATH, paste0("BP_", PARAMETERS[PARAM], "_", MEASURES[MEASURE], 
         TIMEPOINTS, ".", output)))
  3: grid.draw(plot)
  4: grid.draw.ggplot(plot)
  5: print(x)
  6: print.ggplot(x)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 9. Error: oat_plotResultDistribution_overTime (@test_robustness_analysis.R#37
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: oat_plotResultDistribution(getwd(), c("chemoLowerLinearAdjust", "chemoUpperLinearAdjust"), 
         c("Velocity", "Displacement"), c("microns/min", "microns"), "robustness_result.csv", 
         c(0.04, 0.2), PMIN = c(0.015, 0.1), PMAX = c(0.08, 0.5), PINC = c(0.005, 0.05), 
         PARAMVALS = NULL, TIMEPOINTS <- c(12, 36), TIMEPOINTSCALE = "Hours") at testthat/test_robustness_analysis.R:376
  2: oat_plotResultDistribution(FILEPATH, PARAMETERS, MEASURES, MEASURE_SCALE, CSV_FILE_NAME_FULL, 
         BASELINE, PMIN, PMAX, PINC, PARAMVALS, TIMEPOINTS = current_time, TIMEPOINTSCALE = TIMEPOINTSCALE)
  3: ggplot2::ggsave(file.path(FILEPATH, paste0("BP_", PARAMETERS[PARAM], "_", MEASURES[MEASURE], 
         TIMEPOINTS, ".", output)))
  4: grid.draw(plot)
  5: grid.draw.ggplot(plot)
  6: print(x)
  7: print.ggplot(x)
  8: grid.draw(gtable)
  9: grid.draw.gTree(gtable)
  10: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  11: drawGTree(x)
  12: preDraw(x)
  13: preDraw.gTree(x)
  14: pushvpgp(x)
  15: pushgrobvp(x$vp)
  16: pushgrobvp.viewport(x$vp)
  17: pushViewport(vp, recording = FALSE)
  18: lapply(vps, push.vp, recording)
  19: FUN(X[[i]], ...)
  20: push.vp.viewport(X[[i]], ...)
  21: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ══ DONE ════════════════════════════════════════════════════════════════════════
  Error: Test failures
  Execution halted