Running ‘testthat.R’ [7s/10s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(peakPantheR)
  
  This is peakPantheR version 1.2.0 
  
  > 
  > test_check("peakPantheR")
  ── 1. Error: plot feature in 1 sample (@test_plotEICDetectedPeakwidth.R#28)  ───
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plotEICDetectedPeakwidth(list(tmp_DataPoints1), cpdID = "ID-1", cpdName = "testCpd 1", 
         rt = 1000, rtMin = 995, rtMax = 1005, mzMin = 521, mzMax = 523, ratio = 0.85, 
         sampling = 250, curveFitSampleList = list(fit1), sampleColour = NULL, verbose = FALSE) at testthat/test_plotEICDetectedPeakwidth.R:28
  2: gridExtra::grid.arrange(p_spec, p_peakwidth, heights = c(topSize, bottomSize))
  3: grid.draw(g)
  4: grid.draw.gTree(g)
  5: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  6: drawGTree(x)
  7: grid.draw(x$children[[i]], recording = FALSE)
  8: grid.draw.gTree(x$children[[i]], recording = FALSE)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(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.vpStack(X[[i]], ...)
  20: lapply(vp, push.vp, recording)
  21: FUN(X[[i]], ...)
  22: push.vp.viewport(X[[i]], ...)
  23: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 2. Error: plot feature in 2 samples, change colours (@test_plotEICDetectedPea
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plotEICDetectedPeakwidth(list(tmp_DataPoints1, tmp_DataPoints2), cpdID = c("ID-1", 
         "ID-2"), cpdName = c("testCpd 1", "testCpd 2"), rt = c(1000, 1002), rtMin = c(995, 
         997), rtMax = c(1005, 1007), mzMin = c(521, 521), mzMax = c(523, 523), ratio = 0.85, 
         sampling = 250, curveFitSampleList = list(fit1, fit2), sampleColour = c("blue", 
             "red"), verbose = FALSE) at testthat/test_plotEICDetectedPeakwidth.R:43
  2: gridExtra::grid.arrange(p_spec, p_peakwidth, heights = c(topSize, bottomSize))
  3: grid.draw(g)
  4: grid.draw.gTree(g)
  5: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  6: drawGTree(x)
  7: grid.draw(x$children[[i]], recording = FALSE)
  8: grid.draw.gTree(x$children[[i]], recording = FALSE)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(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.vpStack(X[[i]], ...)
  20: lapply(vp, push.vp, recording)
  21: FUN(X[[i]], ...)
  22: push.vp.viewport(X[[i]], ...)
  23: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 3. Error: plot feature in 2 samples, rtMin and/or rtMax are NA (@test_plotEIC
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plotEICDetectedPeakwidth(list(tmp_DataPoints1, tmp_DataPoints2), cpdID = c("ID-1", 
         "ID-2"), cpdName = c("testCpd 1", "testCpd 2"), rt = c(1000, 1002), rtMin = c(NA, 
         997), rtMax = c(1005, NA), mzMin = c(521, 521), mzMax = c(523, 523), ratio = 0.85, 
         sampling = 250, curveFitSampleList = list(fit1, fit2), sampleColour = c("blue", 
             "red"), verbose = FALSE) at testthat/test_plotEICDetectedPeakwidth.R:58
  2: gridExtra::grid.arrange(p_spec, p_peakwidth, heights = c(topSize, bottomSize))
  3: grid.draw(g)
  4: grid.draw.gTree(g)
  5: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  6: drawGTree(x)
  7: grid.draw(x$children[[i]], recording = FALSE)
  8: grid.draw.gTree(x$children[[i]], recording = FALSE)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(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.vpStack(X[[i]], ...)
  20: lapply(vp, push.vp, recording)
  21: FUN(X[[i]], ...)
  22: push.vp.viewport(X[[i]], ...)
  23: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 4. Error: colour warning, ratio replacement (@test_plotEICDetectedPeakwidth.R
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: evaluate_promise(plotEICDetectedPeakwidth(list(tmp_DataPoints1, tmp_DataPoints2), 
         cpdID = c("ID-1", "ID-2"), cpdName = c("testCpd 1", "testCpd 2"), rt = c(1000, 
             1002), rtMin = c(995, 997), rtMax = c(1005, 1007), mzMin = c(521, 521), mzMax = c(523, 
             523), ratio = 2, sampling = 250, curveFitSampleList = list(fit1, fit2), sampleColour = c("blue", 
             "red", "grey"), verbose = TRUE)) at testthat/test_plotEICDetectedPeakwidth.R:76
  2: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  3: force(code)
  4: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  5: withVisible(code)
  6: plotEICDetectedPeakwidth(list(tmp_DataPoints1, tmp_DataPoints2), cpdID = c("ID-1", 
         "ID-2"), cpdName = c("testCpd 1", "testCpd 2"), rt = c(1000, 1002), rtMin = c(995, 
         997), rtMax = c(1005, 1007), mzMin = c(521, 521), mzMax = c(523, 523), ratio = 2, 
         sampling = 250, curveFitSampleList = list(fit1, fit2), sampleColour = c("blue", 
             "red", "grey"), verbose = TRUE)
  7: gridExtra::grid.arrange(p_spec, p_peakwidth, heights = c(topSize, bottomSize))
  8: grid.draw(g)
  9: grid.draw.gTree(g)
  10: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  ...
  19: pushgrobvp(x$vp)
  20: pushgrobvp.viewport(x$vp)
  21: pushViewport(vp, recording = FALSE)
  22: lapply(vps, push.vp, recording)
  23: FUN(X[[i]], ...)
  24: push.vp.vpStack(X[[i]], ...)
  25: lapply(vp, push.vp, recording)
  26: FUN(X[[i]], ...)
  27: push.vp.viewport(X[[i]], ...)
  28: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 5. Error: default parameters, verbose (@test_saveSingleFileMultiEIC.R#40)  ──
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: evaluate_promise(saveSingleFileMultiEIC(ROIsDataPoint = input_ROIsDataPoints, curveFit = input_curveFit, 
         foundPeakTable = input_peakTable, savePath = savePath1, width = 15, height = 15, 
         verbose = TRUE)) at testthat/test_saveSingleFileMultiEIC.R:40
  2: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  3: force(code)
  4: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  5: withVisible(code)
  6: saveSingleFileMultiEIC(ROIsDataPoint = input_ROIsDataPoints, curveFit = input_curveFit, 
         foundPeakTable = input_peakTable, savePath = savePath1, width = 15, height = 15, 
         verbose = TRUE)
  7: plotEICDetectedPeakwidth(ROIDataPointSampleList = list(ROIsDataPoint[[i]]), cpdID = foundPeakTable$cpdID[i], 
         cpdName = foundPeakTable$cpdName[i], rt = foundPeakTable$rt[i], rtMin = foundPeakTable$rtMin[i], 
         rtMax = foundPeakTable$rtMax[i], mzMin = foundPeakTable$mzMin[i], mzMax = foundPeakTable$mzMax[i], 
         ratio = 0.85, curveFitSampleList = list(curveFit[[i]]), sampling = 250, sampleColour = "black", 
         verbose = verbose)
  8: gridExtra::grid.arrange(p_spec, p_peakwidth, heights = c(topSize, bottomSize))
  9: grid.draw(g)
  10: grid.draw.gTree(g)
  ...
  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.vpStack(X[[i]], ...)
  26: lapply(vp, push.vp, recording)
  27: FUN(X[[i]], ...)
  28: push.vp.viewport(X[[i]], ...)
  29: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 6. Error: default parameters, no verbose (@test_saveSingleFileMultiEIC.R#54) 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: evaluate_promise(saveSingleFileMultiEIC(ROIsDataPoint = input_ROIsDataPoints, curveFit = input_curveFit, 
         foundPeakTable = input_peakTable, savePath = savePath2, width = 15, height = 15, 
         verbose = FALSE)) at testthat/test_saveSingleFileMultiEIC.R:54
  2: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  3: force(code)
  4: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  5: withVisible(code)
  6: saveSingleFileMultiEIC(ROIsDataPoint = input_ROIsDataPoints, curveFit = input_curveFit, 
         foundPeakTable = input_peakTable, savePath = savePath2, width = 15, height = 15, 
         verbose = FALSE)
  7: plotEICDetectedPeakwidth(ROIDataPointSampleList = list(ROIsDataPoint[[i]]), cpdID = foundPeakTable$cpdID[i], 
         cpdName = foundPeakTable$cpdName[i], rt = foundPeakTable$rt[i], rtMin = foundPeakTable$rtMin[i], 
         rtMax = foundPeakTable$rtMax[i], mzMin = foundPeakTable$mzMin[i], mzMax = foundPeakTable$mzMax[i], 
         ratio = 0.85, curveFitSampleList = list(curveFit[[i]]), sampling = 250, sampleColour = "black", 
         verbose = verbose)
  8: gridExtra::grid.arrange(p_spec, p_peakwidth, heights = c(topSize, bottomSize))
  9: grid.draw(g)
  10: grid.draw.gTree(g)
  ...
  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.vpStack(X[[i]], ...)
  26: lapply(vp, push.vp, recording)
  27: FUN(X[[i]], ...)
  28: push.vp.viewport(X[[i]], ...)
  29: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 7. Error: only one plot, no verbose (@test_saveSingleFileMultiEIC.R#68)  ────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: evaluate_promise(saveSingleFileMultiEIC(ROIsDataPoint = list(input_ROIsDataPoints[[1]]), 
         curveFit = list(input_curveFit[[1]]), foundPeakTable = input_peakTable[1, ], 
         savePath = savePath3, width = 15, height = 15, verbose = FALSE)) at testthat/test_saveSingleFileMultiEIC.R:68
  2: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  3: force(code)
  4: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  5: withVisible(code)
  6: saveSingleFileMultiEIC(ROIsDataPoint = list(input_ROIsDataPoints[[1]]), curveFit = list(input_curveFit[[1]]), 
         foundPeakTable = input_peakTable[1, ], savePath = savePath3, width = 15, height = 15, 
         verbose = FALSE)
  7: plotEICDetectedPeakwidth(ROIDataPointSampleList = list(ROIsDataPoint[[i]]), cpdID = foundPeakTable$cpdID[i], 
         cpdName = foundPeakTable$cpdName[i], rt = foundPeakTable$rt[i], rtMin = foundPeakTable$rtMin[i], 
         rtMax = foundPeakTable$rtMax[i], mzMin = foundPeakTable$mzMin[i], mzMax = foundPeakTable$mzMax[i], 
         ratio = 0.85, curveFitSampleList = list(curveFit[[i]]), sampling = 250, sampleColour = "black", 
         verbose = verbose)
  8: gridExtra::grid.arrange(p_spec, p_peakwidth, heights = c(topSize, bottomSize))
  9: grid.draw(g)
  10: grid.draw.gTree(g)
  ...
  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.vpStack(X[[i]], ...)
  26: lapply(vp, push.vp, recording)
  27: FUN(X[[i]], ...)
  28: push.vp.viewport(X[[i]], ...)
  29: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 497 SKIPPED: 17 FAILED: 7
  1. Error: plot feature in 1 sample (@test_plotEICDetectedPeakwidth.R#28) 
  2. Error: plot feature in 2 samples, change colours (@test_plotEICDetectedPeakwidth.R#43) 
  3. Error: plot feature in 2 samples, rtMin and/or rtMax are NA (@test_plotEICDetectedPeakwidth.R#58) 
  4. Error: colour warning, ratio replacement (@test_plotEICDetectedPeakwidth.R#76) 
  5. Error: default parameters, verbose (@test_saveSingleFileMultiEIC.R#40) 
  6. Error: default parameters, no verbose (@test_saveSingleFileMultiEIC.R#54) 
  7. Error: only one plot, no verbose (@test_saveSingleFileMultiEIC.R#68) 
  
  Error: testthat unit tests failed
  Execution halted