Running ‘testthat.R’ [4s/12s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > test_check("MALDIquant")
  Loading required package: MALDIquant
  
  This is MALDIquant version 1.19.2
  Quantitative Analysis of Mass Spectrometry Data
   See '?MALDIquant' for more information about this package.
  
  ── 1. Error: alignSpectra (@test_alignSpectra-functions.R#13)  ─────────────────
  unable to find an inherited method for function 'approxfun' for signature '"numeric"'
  1: determineWarpingFunctions(peaks, tolerance = 0.002, method = "lowess") at testthat/test_alignSpectra-functions.R:13
  2: lapply(lIdx[-1L], function(i) {
         notNA <- !is.na(binnedMass[i])
         arguments$x <- mass[i][notNA]
         arguments$d <- d[i][notNA]
         if (!length(arguments$x)) {
             nomatchReporter("Could not match any peak in spectrum ", samples[i[1L]] - 
                 1L, " to a reference peak.")
             NA
         }
         else if (length(arguments$x) < minPeaks) {
             nomatchReporter("Could not match enough peaks in spectrum", samples[i[1L]] - 
                 1L, "to the reference peaks.\n", minPeaks, " matches required, just ", 
                 length(arguments$x), " found.")
             NA
         }
         else {
             do.call(warpingFunction, arguments)
         }
     })
  3: FUN(X[[i]], ...)
  4: do.call(warpingFunction, arguments)
  5: (function (x, d, ...) 
     {
         lo <- lowess(x = x, y = d, ...)
         approxfun(x = lo$x, y = lo$y, rule = 2L)
     })(x = c(1004.09817134797, 1020.71993413148, 1041.74114954466, 1057.20207247176, 
     1065.92259243676, 1077.74684538068, 1101.9122236618, 1113.39590653688, 1132.52302686217, 
     1151.7036818063, 1157.95014321073, 1170.27312528575, 1175.46381470272, 1206.84927839993, 
     1224.7277280676, 1235.69929946372, 1244.89863132592, 1263.6289563652, 1291.29140596205, 
     1298.83488986226, 1309.19931365771, 1317.61417057584, 1329.11106410657, 1350.83204757924, 
     1371.77346428704, 1379.42848258875, 1390.46990714079, 1396.73019193398, 1405.05882785492, 
     1420.57464972149, 1450.26500064173, 1466.39836925207, 1488.33871690464, 1493.56883044674, 
     1504.55692588955, 1519.60562872844, 1537.38359738691, 1545.74074356286, 1562.5230333295, 
     1574.27339644912, 1601.25987855316, 1616.91343502652, 1631.9916782383, 1638.51251585295, 
     1658.15308294357, 1670.25722447363, 1689.02615802249, 1699.24755361705, 1721.78969677075, 
     1731.84122140546, 1740.30712326435, 1750.14265113976, 1762.30681508493, 1771.38972946053, 
     1813.16987727517, 1847.66566763035, 1886.40693074069, 1916.7857135246, 1945.55747641932, 
     1968.52896039676, 1984.15766681349, 1994.94727499272, 2012.12686269263, 2045.68586987206, 
     2068.2128333432, 2081.43508961178, 2105.04541820137, 2209.60403485814, 2264.52235932071, 
     2280.51324317123, 2294.70595537059, 2325.24504765675, 2346.91448988194, 2377.9554203344, 
     2423.78774811232, 2467.97431306962, 2495.29021003451, 2509.81247406064, 2553.79526765993, 
     2643.57117269084, 2660.18179971097, 2769.25012604306, 2862.01685498904, 2932.33360375562, 
     2952.2804938861, 3191.63410008017, 3241.02913333599, 3262.7357969102, 3882.8562290634, 
     4209.69992086375, 4644.04145195543, 5336.74995690919, 5904.56728179499, 7766.20786056138, 
     9289.79642967681), d = c(0.204519677801727, -0.0772530024878506, -0.741394348596486, 
     0.380163184780258, -0.420983877004574, -0.172011431034434, 0.84328276891415, -0.121018613527212, 
     -0.840836382314137, -0.246135164836687, -0.287996973298505, -0.661671640964869, 0.124405193488656, 
     -0.112013236361918, 0.197586957909152, 0.850458816187938, -0.127950583176698, 0.114654111836899, 
     0.52156940765235, 0.130802870130083, -0.145789512413103, 3.70688869679725e-05, 0.132453415363216, 
     0.074094305607332, -0.0746015783156508, -0.568846973314976, -0.24044654869931, -0.542239285203777, 
     -0.34744793343134, -0.121519780799417, -0.168847101366737, -0.463053848542586, -0.357625761939744, 
     0.0623575637607701, 0.0156552448747789, -0.0942729294470155, -0.0948205762176713, 
     0.110958427976584, -0.127333685004487, -0.479764800128578, -1.49982292797154, 1.95130337488081e-05, 
     -0.716456960951518, -0.212028366839832, -0.0328181870565913, 0.164828556800103, 0.265204587995186, 
     0.747999004500116, 0.30117496494131, 1.14119904159907, 0.773784090019717, 0.860282090816554, 
     -0.287657289565914, -2.18808279798509, -0.102898006910436, -0.0866385680042185, -0.227605034568569, 
     -0.0882004925656474, -0.693396823792682, -0.286168691545299, 0.952260391464051, 0.162199983003802, 
     -0.741211521739842, -0.0729072330818781, -0.219933740430406, -0.036766875007288, 
     0.0185194124542249, 0.417026937396258, 0.614076236574419, -0.750685620235345, -0.444143959192843, 
     0.427857658490666, 0.508000652965166, 0.924184718382548, -0.337373033660242, 0.24083781646641, 
     -0.302077024609844, -0.484661764175144, -0.0407404683005552, 0.207384899399131, -0.145544396123114, 
     -0.148494357388245, 0.17260111612768, -0.130971809866878, -0.0875970028860138, -0.159427222073191, 
     -0.390209051159218, -0.161195082720496, -0.175845549266796, -0.104615022652979, -0.0274277798107505, 
     -0.235655631507143, -0.278871316514596, -0.284306431211007, -0.0387286594286707))
  6: approxfun(x = lo$x, y = lo$y, rule = 2L)
  7: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), new("standardGeneric", .Data = function (x, y = NULL, method = "linear", 
         yleft, yright, rule = 1, f = 0, ties = mean) 
     standardGeneric("approxfun"), generic = structure("approxfun", package = "MALDIquant"), 
         package = "MALDIquant", group = list(), valueClass = character(0), signature = c("x", 
         "y", "method", "yleft", "yright", "rule", "f", "ties"), default = NULL, skeleton = (function (x, 
             y = NULL, method = "linear", yleft, yright, rule = 1, f = 0, ties = mean) 
         stop("invalid call in method dispatch to 'approxfun' (no default method)", domain = NA))(x, 
             y, method, yleft, yright, rule, f, ties)), <environment>)
  8: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  ── 2. Error: approxfun (@test_approxfun-methods.R#10)  ─────────────────────────
  unable to find an inherited method for function 'approxfun' for signature '"integer"'
  1: expect_equal(approxfun(s)(seq(0, 11, by = 0.5)), c(NA, NA, seq(11, 20, by = 0.5), 
         NA, NA)) at testthat/test_approxfun-methods.R:10
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: approxfun(s)
  5: approxfun(s)
  6: approxfun(x = x@mass, y = x@intensity, method = method, yleft = yleft, yright = yright, 
         rule = rule, f = f, ties = ties)
  7: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("integer"), new("standardGeneric", .Data = function (x, y = NULL, method = "linear", 
         yleft, yright, rule = 1, f = 0, ties = mean) 
     standardGeneric("approxfun"), generic = structure("approxfun", package = "MALDIquant"), 
         package = "MALDIquant", group = list(), valueClass = character(0), signature = c("x", 
         "y", "method", "yleft", "yright", "rule", "f", "ties"), default = NULL, skeleton = (function (x, 
             y = NULL, method = "linear", yleft, yright, rule = 1, f = 0, ties = mean) 
         stop("invalid call in method dispatch to 'approxfun' (no default method)", domain = NA))(x, 
             y, method, yleft, yright, rule, f, ties)), <environment>)
  8: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  ── 3. Error: averageMassSpectra (@test_averageMassSpectra-functions.R#16)  ─────
  unable to find an inherited method for function 'approxfun' for signature '"integer"'
  1: expect_equal(unname(averageMassSpectra(list(s[[1]], s[[1]], s[[2]], s[[2]]), labels = c(1:2, 
         1:2))), list(meanS, meanS)) at testthat/test_averageMassSpectra-functions.R:16
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: unname(averageMassSpectra(list(s[[1]], s[[1]], s[[2]], s[[2]]), labels = c(1:2, 1:2)))
  5: averageMassSpectra(list(s[[1]], s[[1]], s[[2]], s[[2]]), labels = c(1:2, 1:2))
  6: .doByLabels(l = l, labels = labels, FUN = .averageMassSpectra, fun = fun, ...)
  7: .lapply(split(unlist(l), labels), FUN = FUN, ..., mc.cores = mc.cores)
  8: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores)
  9: lapply(X = X, FUN = FUN, ...)
  10: FUN(X[[i]], ...)
  11: lapply(l, approxfun)
  12: FUN(X[[i]], ...)
  13: FUN(X[[i]], ...)
  14: approxfun(x = x@mass, y = x@intensity, method = method, yleft = yleft, yright = yright, 
         rule = rule, f = f, ties = ties)
  15: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("integer"), new("standardGeneric", .Data = function (x, y = NULL, method = "linear", 
         yleft, yright, rule = 1, f = 0, ties = mean) 
     standardGeneric("approxfun"), generic = structure("approxfun", package = "MALDIquant"), 
         package = "MALDIquant", group = list(), valueClass = character(0), signature = c("x", 
         "y", "method", "yleft", "yright", "rule", "f", "ties"), default = NULL, skeleton = (function (x, 
             y = NULL, method = "linear", yleft, yright, rule = 1, f = 0, ties = mean) 
         stop("invalid call in method dispatch to 'approxfun' (no default method)", domain = NA))(x, 
             y, method, yleft, yright, rule, f, ties)), <environment>)
  16: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  ── 4. Error: averageMassSpectra works with empty spectra (@test_averageMassSpect
  unable to find an inherited method for function 'approxfun' for signature '"integer"'
  1: expect_equal(unname(averageMassSpectra(list(s[[1]], e))), s[[1]]) at testthat/test_averageMassSpectra-functions.R:42
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: unname(averageMassSpectra(list(s[[1]], e)))
  5: averageMassSpectra(list(s[[1]], e))
  6: .doByLabels(l = l, labels = labels, FUN = .averageMassSpectra, fun = fun, ...)
  7: FUN(l, ...)
  8: lapply(l, approxfun)
  9: FUN(X[[i]], ...)
  10: FUN(X[[i]], ...)
  11: approxfun(x = x@mass, y = x@intensity, method = method, yleft = yleft, yright = yright, 
         rule = rule, f = f, ties = ties)
  12: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("integer"), new("standardGeneric", .Data = function (x, y = NULL, method = "linear", 
         yleft, yright, rule = 1, f = 0, ties = mean) 
     standardGeneric("approxfun"), generic = structure("approxfun", package = "MALDIquant"), 
         package = "MALDIquant", group = list(), valueClass = character(0), signature = c("x", 
         "y", "method", "yleft", "yright", "rule", "f", "ties"), default = NULL, skeleton = (function (x, 
             y = NULL, method = "linear", yleft, yright, rule = 1, f = 0, ties = mean) 
         stop("invalid call in method dispatch to 'approxfun' (no default method)", domain = NA))(x, 
             y, method, yleft, yright, rule, f, ties)), <environment>)
  13: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  ── 5. Error: .averageMassSpectra (@test_averageMassSpectra-functions.R#47)  ────
  unable to find an inherited method for function 'approxfun' for signature '"integer"'
  1: expect_equal(MALDIquant:::.averageMassSpectra(s), meanS) at testthat/test_averageMassSpectra-functions.R:47
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: MALDIquant:::.averageMassSpectra(s)
  5: lapply(l, approxfun)
  6: FUN(X[[i]], ...)
  7: FUN(X[[i]], ...)
  8: approxfun(x = x@mass, y = x@intensity, method = method, yleft = yleft, yright = yright, 
         rule = rule, f = f, ties = ties)
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("integer"), new("standardGeneric", .Data = function (x, y = NULL, method = "linear", 
         yleft, yright, rule = 1, f = 0, ties = mean) 
     standardGeneric("approxfun"), generic = structure("approxfun", package = "MALDIquant"), 
         package = "MALDIquant", group = list(), valueClass = character(0), signature = c("x", 
         "y", "method", "yleft", "yright", "rule", "f", "ties"), default = NULL, skeleton = (function (x, 
             y = NULL, method = "linear", yleft, yright, rule = 1, f = 0, ties = mean) 
         stop("invalid call in method dispatch to 'approxfun' (no default method)", domain = NA))(x, 
             y, method, yleft, yright, rule, f, ties)), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  ── 6. Error: calibrateIntensity works with PQN (@test_calibrateIntensity-methods
  unable to find an inherited method for function 'approxfun' for signature '"integer"'
  1: calibrateIntensity(s, method = "PQN") at testthat/test_calibrateIntensity-methods.R:52
  2: calibrateIntensity(s, method = "PQN")
  3: .local(object, ...)
  4: .calibrateProbabilisticQuotientNormalization(object, range = range)
  5: .averageMassSpectra(l, fun = .colMedians, mergeMetaData = FALSE)
  6: lapply(l, approxfun)
  7: FUN(X[[i]], ...)
  8: FUN(X[[i]], ...)
  9: approxfun(x = x@mass, y = x@intensity, method = method, yleft = yleft, yright = yright, 
         rule = rule, f = f, ties = ties)
  10: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("integer"), new("standardGeneric", .Data = function (x, y = NULL, method = "linear", 
         yleft, yright, rule = 1, f = 0, ties = mean) 
     standardGeneric("approxfun"), generic = structure("approxfun", package = "MALDIquant"), 
         package = "MALDIquant", group = list(), valueClass = character(0), signature = c("x", 
         "y", "method", "yleft", "yright", "rule", "f", "ties"), default = NULL, skeleton = (function (x, 
             y = NULL, method = "linear", yleft, yright, rule = 1, f = 0, ties = mean) 
         stop("invalid call in method dispatch to 'approxfun' (no default method)", domain = NA))(x, 
             y, method, yleft, yright, rule, f, ties)), <environment>)
  11: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  ── 7. Error: determineWarpingFunctions throws warnings (@test_determineWarpingFu
  unable to find an inherited method for function 'approxfun' for signature '"numeric"'
  1: expect_warning(determineWarpingFunctions(p, reference = r[6:10]), "Reference MassPeaks object contains very few peaks") at testthat/test_determineWarpingFunctions-functions.R:18
  2: quasi_capture(enquo(object), label, capture_warnings)
  3: .capture(act$val <- eval_bare(get_expr(.quo), get_env(.quo)), ...)
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(.quo), get_env(.quo))
  6: determineWarpingFunctions(p, reference = r[6:10])
  7: lapply(lIdx[-1L], function(i) {
         notNA <- !is.na(binnedMass[i])
         arguments$x <- mass[i][notNA]
         arguments$d <- d[i][notNA]
         if (!length(arguments$x)) {
             nomatchReporter("Could not match any peak in spectrum ", samples[i[1L]] - 
                 1L, " to a reference peak.")
             NA
         }
         else if (length(arguments$x) < minPeaks) {
             nomatchReporter("Could not match enough peaks in spectrum", samples[i[1L]] - 
                 1L, "to the reference peaks.\n", minPeaks, " matches required, just ", 
                 length(arguments$x), " found.")
             NA
         }
         else {
             do.call(warpingFunction, arguments)
         }
     })
  8: FUN(X[[i]], ...)
  9: do.call(warpingFunction, arguments)
  10: (function (x, d, ...) 
     {
         lo <- lowess(x = x, y = d, ...)
         approxfun(x = lo$x, y = lo$y, rule = 2L)
     })(x = c(6.01, 7.01, 8.01, 9.01, 10.01), d = c(-0.00999999999999979, -0.00999999999999979, 
     -0.00999999999999979, -0.00999999999999979, -0.00999999999999979))
  11: approxfun(x = lo$x, y = lo$y, rule = 2L)
  12: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), new("standardGeneric", .Data = function (x, y = NULL, method = "linear", 
         yleft, yright, rule = 1, f = 0, ties = mean) 
     standardGeneric("approxfun"), generic = structure("approxfun", package = "MALDIquant"), 
         package = "MALDIquant", group = list(), valueClass = character(0), signature = c("x", 
         "y", "method", "yleft", "yright", "rule", "f", "ties"), default = NULL, skeleton = (function (x, 
             y = NULL, method = "linear", yleft, yright, rule = 1, f = 0, ties = mean) 
         stop("invalid call in method dispatch to 'approxfun' (no default method)", domain = NA))(x, 
             y, method, yleft, yright, rule, f, ties)), <environment>)
  13: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  ── 8. Error: determineWarpingFunctions supports allowNoMatches argument (@test_d
  unable to find an inherited method for function 'approxfun' for signature '"numeric"'
  1: suppressWarnings(w <- determineWarpingFunctions(list(p, createMassPeaks(11, 11), 
         p), reference = r, allowNoMatches = TRUE)) at testthat/test_determineWarpingFunctions-functions.R:49
  2: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  3: determineWarpingFunctions(list(p, createMassPeaks(11, 11), p), reference = r, allowNoMatches = TRUE)
  4: lapply(lIdx[-1L], function(i) {
         notNA <- !is.na(binnedMass[i])
         arguments$x <- mass[i][notNA]
         arguments$d <- d[i][notNA]
         if (!length(arguments$x)) {
             nomatchReporter("Could not match any peak in spectrum ", samples[i[1L]] - 
                 1L, " to a reference peak.")
             NA
         }
         else if (length(arguments$x) < minPeaks) {
             nomatchReporter("Could not match enough peaks in spectrum", samples[i[1L]] - 
                 1L, "to the reference peaks.\n", minPeaks, " matches required, just ", 
                 length(arguments$x), " found.")
             NA
         }
         else {
             do.call(warpingFunction, arguments)
         }
     })
  5: FUN(X[[i]], ...)
  6: do.call(warpingFunction, arguments)
  7: (function (x, d, ...) 
     {
         lo <- lowess(x = x, y = d, ...)
         approxfun(x = lo$x, y = lo$y, rule = 2L)
     })(x = c(5.01, 6.01, 7.01, 8.01, 9.01, 10.01), d = c(-0.00999999999999979, -0.00999999999999979, 
     -0.00999999999999979, -0.00999999999999979, -0.00999999999999979, -0.00999999999999979
     ))
  8: approxfun(x = lo$x, y = lo$y, rule = 2L)
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), new("standardGeneric", .Data = function (x, y = NULL, method = "linear", 
         yleft, yright, rule = 1, f = 0, ties = mean) 
     standardGeneric("approxfun"), generic = structure("approxfun", package = "MALDIquant"), 
         package = "MALDIquant", group = list(), valueClass = character(0), signature = c("x", 
         "y", "method", "yleft", "yright", "rule", "f", "ties"), default = NULL, skeleton = (function (x, 
             y = NULL, method = "linear", yleft, yright, rule = 1, f = 0, ties = mean) 
         stop("invalid call in method dispatch to 'approxfun' (no default method)", domain = NA))(x, 
             y, method, yleft, yright, rule, f, ties)), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  ── 9. Error: intensityMatrix (@test_intensityMatrix-functions.R#27)  ───────────
  unable to find an inherited method for function 'approxfun' for signature '"integer"'
  1: expect_equal(intensityMatrix(p, s), e) at testthat/test_intensityMatrix-functions.R:27
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: intensityMatrix(p, s)
  5: lapply(spectra, approxfun, yleft = 0L, yright = 0L)
  6: FUN(X[[i]], ...)
  7: FUN(X[[i]], ...)
  8: approxfun(x = x@mass, y = x@intensity, method = method, yleft = yleft, yright = yright, 
         rule = rule, f = f, ties = ties)
  9: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("integer"), new("standardGeneric", .Data = function (x, y = NULL, method = "linear", 
         yleft, yright, rule = 1, f = 0, ties = mean) 
     standardGeneric("approxfun"), generic = structure("approxfun", package = "MALDIquant"), 
         package = "MALDIquant", group = list(), valueClass = character(0), signature = c("x", 
         "y", "method", "yleft", "yright", "rule", "f", "ties"), default = NULL, skeleton = (function (x, 
             y = NULL, method = "linear", yleft, yright, rule = 1, f = 0, ties = mean) 
         stop("invalid call in method dispatch to 'approxfun' (no default method)", domain = NA))(x, 
             y, method, yleft, yright, rule, f, ties)), <environment>)
  10: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  ── 10. Error: .warpingFunctionLowess (@test_warpingFunctions-functions.R#8)  ───
  unable to find an inherited method for function 'approxfun' for signature '"numeric"'
  1: expect_equal((MALDIquant:::.warpingFunctionLowess(1:10, (1:10)^2))(1:10), al(1:10)(1:10)) at testthat/test_warpingFunctions-functions.R:8
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: MALDIquant:::.warpingFunctionLowess(1:10, (1:10)^2)
  5: approxfun(x = lo$x, y = lo$y, rule = 2L)
  6: (function (classes, fdef, mtable) 
     {
         methods <- .findInheritedMethods(classes, fdef, mtable)
         if (length(methods) == 1L) 
             return(methods[[1L]])
         else if (length(methods) == 0L) {
             cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
             stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                 sQuote(fdef@generic), sQuote(cnames)), domain = NA)
         }
         else stop("Internal error in finding inherited methods; didn't return a unique method", 
             domain = NA)
     })(list("numeric"), new("standardGeneric", .Data = function (x, y = NULL, method = "linear", 
         yleft, yright, rule = 1, f = 0, ties = mean) 
     standardGeneric("approxfun"), generic = structure("approxfun", package = "MALDIquant"), 
         package = "MALDIquant", group = list(), valueClass = character(0), signature = c("x", 
         "y", "method", "yleft", "yright", "rule", "f", "ties"), default = NULL, skeleton = (function (x, 
             y = NULL, method = "linear", yleft, yright, rule = 1, f = 0, ties = mean) 
         stop("invalid call in method dispatch to 'approxfun' (no default method)", domain = NA))(x, 
             y, method, yleft, yright, rule, f, ties)), <environment>)
  7: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
         sQuote(fdef@generic), sQuote(cnames)), domain = NA)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 518 SKIPPED: 0 WARNINGS: 0 FAILED: 10
  1.  Error: alignSpectra (@test_alignSpectra-functions.R#13) 
  2.  Error: approxfun (@test_approxfun-methods.R#10) 
  3.  Error: averageMassSpectra (@test_averageMassSpectra-functions.R#16) 
  4.  Error: averageMassSpectra works with empty spectra (@test_averageMassSpectra-functions.R#42) 
  5.  Error: .averageMassSpectra (@test_averageMassSpectra-functions.R#47) 
  6.  Error: calibrateIntensity works with PQN (@test_calibrateIntensity-methods.R#52) 
  7.  Error: determineWarpingFunctions throws warnings (@test_determineWarpingFunctions-functions.R#18) 
  8.  Error: determineWarpingFunctions supports allowNoMatches argument (@test_determineWarpingFunctions-functions.R#49) 
  9.  Error: intensityMatrix (@test_intensityMatrix-functions.R#27) 
  10. Error: .warpingFunctionLowess (@test_warpingFunctions-functions.R#8) 
  
  Error: testthat unit tests failed
  Execution halted