Running ‘testthat.R’ [13s/14s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(fmriqa)
  > 
  > test_check("fmriqa")
  Reading data  : /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/fmriqa/extdata/qa_data.nii.gz
  
  Basic analysis parameters
  -------------------------
  X,Y matrix     : 80x80
  Slices         : 1
  X,Y,Z pix dims : 1x1x1mm
  TR             : 3s
  Slice #        : 1
  ROI width      : 21
  Total vols     : 200
  Analysis vols  : 198
  
  QA metrics
  ----------
  Mean signal   : 2561.3
  STD           : 6.4
  Percent fluc  : 0.25
  Drift         : 2.06
  Drift fit     : 1.42
  SNR           : 141.3
  SFNR          : 137
  RDC           : 2.84
  TC outlier    : 2.66
  Spec outlier  : 5.12
  MBG percent   : 0.65
  
  Calculating k-space spike detection map...
  ── 1. Error: default analysis is consistent (@test_qa_measures.R#5)  ───────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: run_fmriqa(data_file = fname, tr = 3, png_fname = tempfile(), res_fname = tempfile(), 
         spike_detect = TRUE) at testthat/test_qa_measures.R:5
  2: grid.arrange(text, tc_plot, spec_plot, av_plot, diff_plot, sfnr_plot, tfn_plot, slice_tc_plot, 
         rdc_plot, bg_plot, tc_plot_bg, max_slice_proj_plot, layout_matrix = lay, top = title)
  3: arrangeGrob(...)
  4: lapply(grobs[toconv], ggplot2::ggplotGrob)
  5: FUN(X[[i]], ...)
  6: ggplot_gtable(ggplot_build(x))
  7: ggplot_gtable.ggplot_built(ggplot_build(x))
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  19: pushvpgp(x)
  20: pushgrobvp(x$vp)
  21: pushgrobvp.viewport(x$vp)
  22: pushViewport(vp, recording = FALSE)
  23: lapply(vps, push.vp, recording)
  24: FUN(X[[i]], ...)
  25: push.vp.vpTree(X[[i]], ...)
  26: push.vp(vp$parent, recording)
  27: push.vp.viewport(vp$parent, recording)
  28: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  Reading data  : /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/fmriqa/extdata/qa_data.nii.gz
  
  Basic analysis parameters
  -------------------------
  X,Y matrix     : 80x80
  Slices         : 1
  X,Y,Z pix dims : 1x1x1mm
  TR             : 3s
  Slice #        : 1
  ROI width      : 21
  Total vols     : 200
  Analysis vols  : 198
  
  QA metrics
  ----------
  Mean signal   : 2561.3
  STD           : 6.4
  Percent fluc  : 0.25
  Drift         : 2.06
  Drift fit     : 1.42
  SNR           : 141.3
  SFNR          : 137
  RDC           : 2.84
  TC outlier    : 2.66
  Spec outlier  : 5.12
  MBG percent   : 0.65
  ── 2. Error: pdf output runs (@test_qa_measures.R#13)  ─────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: run_fmriqa(data_file = fname, tr = 3, pdf_fname = tempfile(), gen_pdf = TRUE, gen_res_csv = FALSE, 
         gen_png = FALSE) at testthat/test_qa_measures.R:13
  2: grid.arrange(text, tc_plot, spec_plot, av_plot, diff_plot, sfnr_plot, tfn_plot, slice_tc_plot, 
         rdc_plot, bg_plot, tc_plot_bg, layout_matrix = lay, top = title)
  3: arrangeGrob(...)
  4: lapply(grobs[toconv], ggplot2::ggplotGrob)
  5: FUN(X[[i]], ...)
  6: ggplot_gtable(ggplot_build(x))
  7: ggplot_gtable.ggplot_built(ggplot_build(x))
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  19: pushvpgp(x)
  20: pushgrobvp(x$vp)
  21: pushgrobvp.viewport(x$vp)
  22: pushViewport(vp, recording = FALSE)
  23: lapply(vps, push.vp, recording)
  24: FUN(X[[i]], ...)
  25: push.vp.vpTree(X[[i]], ...)
  26: push.vp(vp$parent, recording)
  27: push.vp.viewport(vp$parent, recording)
  28: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  Reading data  : /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/fmriqa/extdata/qa_data.nii.gz
  
  Basic analysis parameters
  -------------------------
  X,Y matrix     : 80x80
  Slices         : 1
  X,Y,Z pix dims : 1x1x1mm
  TR             : 3s
  Slice #        : 1
  ROI width      : 21
  Total vols     : 200
  Analysis vols  : 198
  
  QA metrics
  ----------
  Mean signal   : 2561.3
  STD           : 6.4
  Percent fluc  : 0.25
  Drift         : 2.06
  Drift fit     : 1.42
  SNR           : 141.3
  SFNR          : 137
  RDC           : 2.84
  TC outlier    : 2.66
  Spec outlier  : 5.12
  MBG percent   : 0.65
  
  CSV spec file : /tmp/Rtmp93VRtv/file196e4b590cfb══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 0 SKIPPED: 1 FAILED: 2
  1. Error: default analysis is consistent (@test_qa_measures.R#5) 
  2. Error: pdf output runs (@test_qa_measures.R#13) 
  
  Error: testthat unit tests failed
  Execution halted