CRAN Package Check Results for Package quantspec

Last updated on 2020-03-07 11:48:26 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.2-1 37.06 192.45 229.51 ERROR
r-devel-linux-x86_64-debian-gcc 1.2-1 25.77 150.15 175.92 ERROR
r-devel-linux-x86_64-fedora-clang 1.2-1 277.95 ERROR
r-devel-linux-x86_64-fedora-gcc 1.2-1 268.74 ERROR
r-devel-windows-ix86+x86_64 1.2-1 95.00 281.00 376.00 OK
r-devel-windows-ix86+x86_64-gcc8 1.2-1 74.00 305.00 379.00 OK
r-patched-linux-x86_64 1.2-1 27.88 166.63 194.51 OK
r-patched-solaris-x86 1.2-1 328.20 OK
r-release-linux-x86_64 1.2-1 28.37 168.28 196.65 OK
r-release-windows-ix86+x86_64 1.2-1 70.00 249.00 319.00 OK
r-release-osx-x86_64 1.2-1 OK
r-oldrel-windows-ix86+x86_64 1.2-1 57.00 246.00 303.00 OK
r-oldrel-osx-x86_64 1.2-1 OK

Check Details

Version: 1.2-1
Check: tests
Result: ERROR
     Running 'test-all.R' [13s/14s]
     Running 'testthat.R' [15s/16s]
    Running the tests in 'tests/test-all.R' failed.
    Complete output:
     > library(testthat)
     > library(quantspec)
     Loading required package: stats4
     >
     > #' @importFrom testthat test_package
     > test_check("quantspec")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     quantspec
     --- call from context ---
     smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     --- call from argument ---
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     } else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     } else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     } else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     } else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     --- R stacktrace ---
     where 1 at testthat/test-multivariate.R#132: smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-multivariate.R#119: test_that("multivariate functions work as expected (check against ref-results.rdata",
     {
     source("load-ref.R")
     set.seed(2581)
     Y1 <- ts1(16)
     Y2 <- ts1(16)
     Y <- matrix(c(Y1, Y2), ncol = 2)
     lev.ok.all <- c(0.25, 0.5, 0.75)
     weight = kernelWeight(W = W0, N = 64, bw = 0.2)
     sPG.fft <- smoothedPG(Y, levels.1 = lev.ok.all, weight = weight,
     type = "clipped")
     W.fft.ci.mult <- getPointwiseCIs(sPG.fft)
     W.fft.coh.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherency")
     W.fft.cohsq.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherence")
     W.fft.sd.mult <- getSdNaive(sPG.fft)
     W.fft.coh.sd.1.mult <- getCoherencySdNaive(sPG.fft, type = "1")
     W.fft.coh.sd.2.mult <- getCoherencySdNaive(sPG.fft, type = "2")
     expect_equal(W.fft.ci.mult, W.fft.ci.mult.ref)
     expect_equal(W.fft.coh.ci.mult.ref, W.fft.coh.ci.mult)
     expect_equal(W.fft.cohsq.ci.mult.ref, W.fft.cohsq.ci.mult)
     expect_equal(W.fft.sd.mult.ref, W.fft.sd.mult.ref)
     expect_equal(W.fft.coh.sd.1.mult.ref, W.fft.coh.sd.1.mult.ref)
     expect_equal(W.fft.coh.sd.2.mult.ref, W.fft.coh.sd.2.mult.ref)
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 40: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 41: test_check("quantspec")
    
     --- value of length: 2 type: logical ---
     [1] TRUE FALSE
     --- function from context ---
     function (object, frequencies = 2 * pi/lenTS(object) * 0:(lenTS(object) -
     1), levels.1 = 0.5, levels.2 = levels.1, isRankBased = TRUE,
     type = c("clipped", "qr"), type.boot = c("none", "mbb"),
     method = c("br", "fn", "pfn", "fnc", "lasso", "scad"), parallel = FALSE,
     B = 0, l = 1, weight = kernelWeight())
     {
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     }
     else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     }
     else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     }
     else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     }
     else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     if (versConstr == 1) {
     levels.all <- union(levels.1, levels.2)
     K1 <- length(levels.1)
     K2 <- length(levels.2)
     J <- length(frequencies)
     qPG <- quantilePG(Y, frequencies = 2 * pi/lenTS(Y) *
     0:(lenTS(Y) - 1), levels.1 = levels.1, levels.2 = levels.2,
     isRankBased = isRankBased, type = type, type.boot = type.boot,
     B = B, l = l)
     }
     else if (versConstr == 2) {
     qPG <- object
     }
     obj <- new(Class = "SmoothedPG", qPG = qPG, weight = weight,
     frequencies = frequencies, levels = list(levels.1, levels.2))
     return(obj)
     }
     <bytecode: 0x819fd90>
     <environment: namespace:quantspec>
     --- function search by body ---
     Function smoothedPG in namespace quantspec has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 1. Error: multivariate functions work as expected (check against ref-results.
     the condition has length > 1
     Backtrace:
     1. quantspec::smoothedPG(...)
    
     == testthat results ===========================================================
     [ OK: 83 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: multivariate functions work as expected (check against ref-results.rdata (@test-multivariate.R#132)
    
     Error: testthat unit tests failed
     Execution halted
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > #library(quantspec)
     >
     > # importFrom testthat test_package
     > # test_package("quantspec")
     > test_check("quantspec")
     Loading required package: quantspec
     Loading required package: stats4
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     quantspec
     --- call from context ---
     smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     --- call from argument ---
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     } else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     } else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     } else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     } else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     --- R stacktrace ---
     where 1 at testthat/test-multivariate.R#132: smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-multivariate.R#119: test_that("multivariate functions work as expected (check against ref-results.rdata",
     {
     source("load-ref.R")
     set.seed(2581)
     Y1 <- ts1(16)
     Y2 <- ts1(16)
     Y <- matrix(c(Y1, Y2), ncol = 2)
     lev.ok.all <- c(0.25, 0.5, 0.75)
     weight = kernelWeight(W = W0, N = 64, bw = 0.2)
     sPG.fft <- smoothedPG(Y, levels.1 = lev.ok.all, weight = weight,
     type = "clipped")
     W.fft.ci.mult <- getPointwiseCIs(sPG.fft)
     W.fft.coh.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherency")
     W.fft.cohsq.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherence")
     W.fft.sd.mult <- getSdNaive(sPG.fft)
     W.fft.coh.sd.1.mult <- getCoherencySdNaive(sPG.fft, type = "1")
     W.fft.coh.sd.2.mult <- getCoherencySdNaive(sPG.fft, type = "2")
     expect_equal(W.fft.ci.mult, W.fft.ci.mult.ref)
     expect_equal(W.fft.coh.ci.mult.ref, W.fft.coh.ci.mult)
     expect_equal(W.fft.cohsq.ci.mult.ref, W.fft.cohsq.ci.mult)
     expect_equal(W.fft.sd.mult.ref, W.fft.sd.mult.ref)
     expect_equal(W.fft.coh.sd.1.mult.ref, W.fft.coh.sd.1.mult.ref)
     expect_equal(W.fft.coh.sd.2.mult.ref, W.fft.coh.sd.2.mult.ref)
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 40: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 41: test_check("quantspec")
    
     --- value of length: 2 type: logical ---
     [1] TRUE FALSE
     --- function from context ---
     function (object, frequencies = 2 * pi/lenTS(object) * 0:(lenTS(object) -
     1), levels.1 = 0.5, levels.2 = levels.1, isRankBased = TRUE,
     type = c("clipped", "qr"), type.boot = c("none", "mbb"),
     method = c("br", "fn", "pfn", "fnc", "lasso", "scad"), parallel = FALSE,
     B = 0, l = 1, weight = kernelWeight())
     {
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     }
     else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     }
     else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     }
     else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     }
     else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     if (versConstr == 1) {
     levels.all <- union(levels.1, levels.2)
     K1 <- length(levels.1)
     K2 <- length(levels.2)
     J <- length(frequencies)
     qPG <- quantilePG(Y, frequencies = 2 * pi/lenTS(Y) *
     0:(lenTS(Y) - 1), levels.1 = levels.1, levels.2 = levels.2,
     isRankBased = isRankBased, type = type, type.boot = type.boot,
     B = B, l = l)
     }
     else if (versConstr == 2) {
     qPG <- object
     }
     obj <- new(Class = "SmoothedPG", qPG = qPG, weight = weight,
     frequencies = frequencies, levels = list(levels.1, levels.2))
     return(obj)
     }
     <bytecode: 0x832e1d8>
     <environment: namespace:quantspec>
     --- function search by body ---
     Function smoothedPG in namespace quantspec has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 1. Error: multivariate functions work as expected (check against ref-results.
     the condition has length > 1
     Backtrace:
     1. quantspec::smoothedPG(...)
    
     == testthat results ===========================================================
     [ OK: 83 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: multivariate functions work as expected (check against ref-results.rdata (@test-multivariate.R#132)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.2-1
Check: for non-standard things in the check directory
Result: NOTE
    Found the following files/directories:
     'QAR1.pdf' 'QAR1.rdata'
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 1.2-1
Check: tests
Result: ERROR
     Running ‘test-all.R’ [11s/17s]
     Running ‘testthat.R’ [11s/17s]
    Running the tests in ‘tests/test-all.R’ failed.
    Complete output:
     > library(testthat)
     > library(quantspec)
     Loading required package: stats4
     >
     > #' @importFrom testthat test_package
     > test_check("quantspec")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     quantspec
     --- call from context ---
     smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     --- call from argument ---
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     } else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     } else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     } else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     } else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     --- R stacktrace ---
     where 1 at testthat/test-multivariate.R#132: smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-multivariate.R#119: test_that("multivariate functions work as expected (check against ref-results.rdata",
     {
     source("load-ref.R")
     set.seed(2581)
     Y1 <- ts1(16)
     Y2 <- ts1(16)
     Y <- matrix(c(Y1, Y2), ncol = 2)
     lev.ok.all <- c(0.25, 0.5, 0.75)
     weight = kernelWeight(W = W0, N = 64, bw = 0.2)
     sPG.fft <- smoothedPG(Y, levels.1 = lev.ok.all, weight = weight,
     type = "clipped")
     W.fft.ci.mult <- getPointwiseCIs(sPG.fft)
     W.fft.coh.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherency")
     W.fft.cohsq.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherence")
     W.fft.sd.mult <- getSdNaive(sPG.fft)
     W.fft.coh.sd.1.mult <- getCoherencySdNaive(sPG.fft, type = "1")
     W.fft.coh.sd.2.mult <- getCoherencySdNaive(sPG.fft, type = "2")
     expect_equal(W.fft.ci.mult, W.fft.ci.mult.ref)
     expect_equal(W.fft.coh.ci.mult.ref, W.fft.coh.ci.mult)
     expect_equal(W.fft.cohsq.ci.mult.ref, W.fft.cohsq.ci.mult)
     expect_equal(W.fft.sd.mult.ref, W.fft.sd.mult.ref)
     expect_equal(W.fft.coh.sd.1.mult.ref, W.fft.coh.sd.1.mult.ref)
     expect_equal(W.fft.coh.sd.2.mult.ref, W.fft.coh.sd.2.mult.ref)
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 40: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 41: test_check("quantspec")
    
     --- value of length: 2 type: logical ---
     [1] TRUE FALSE
     --- function from context ---
     function (object, frequencies = 2 * pi/lenTS(object) * 0:(lenTS(object) -
     1), levels.1 = 0.5, levels.2 = levels.1, isRankBased = TRUE,
     type = c("clipped", "qr"), type.boot = c("none", "mbb"),
     method = c("br", "fn", "pfn", "fnc", "lasso", "scad"), parallel = FALSE,
     B = 0, l = 1, weight = kernelWeight())
     {
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     }
     else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     }
     else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     }
     else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     }
     else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     if (versConstr == 1) {
     levels.all <- union(levels.1, levels.2)
     K1 <- length(levels.1)
     K2 <- length(levels.2)
     J <- length(frequencies)
     qPG <- quantilePG(Y, frequencies = 2 * pi/lenTS(Y) *
     0:(lenTS(Y) - 1), levels.1 = levels.1, levels.2 = levels.2,
     isRankBased = isRankBased, type = type, type.boot = type.boot,
     B = B, l = l)
     }
     else if (versConstr == 2) {
     qPG <- object
     }
     obj <- new(Class = "SmoothedPG", qPG = qPG, weight = weight,
     frequencies = frequencies, levels = list(levels.1, levels.2))
     return(obj)
     }
     <bytecode: 0x55e29ef2cd78>
     <environment: namespace:quantspec>
     --- function search by body ---
     Function smoothedPG in namespace quantspec has this body.
     ----------- END OF FAILURE REPORT --------------
     ── 1. Error: multivariate functions work as expected (check against ref-results.
     the condition has length > 1
     Backtrace:
     1. quantspec::smoothedPG(...)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 83 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: multivariate functions work as expected (check against ref-results.rdata (@test-multivariate.R#132)
    
     Error: testthat unit tests failed
     Execution halted
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > #library(quantspec)
     >
     > # importFrom testthat test_package
     > # test_package("quantspec")
     > test_check("quantspec")
     Loading required package: quantspec
     Loading required package: stats4
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     quantspec
     --- call from context ---
     smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     --- call from argument ---
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     } else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     } else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     } else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     } else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     --- R stacktrace ---
     where 1 at testthat/test-multivariate.R#132: smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-multivariate.R#119: test_that("multivariate functions work as expected (check against ref-results.rdata",
     {
     source("load-ref.R")
     set.seed(2581)
     Y1 <- ts1(16)
     Y2 <- ts1(16)
     Y <- matrix(c(Y1, Y2), ncol = 2)
     lev.ok.all <- c(0.25, 0.5, 0.75)
     weight = kernelWeight(W = W0, N = 64, bw = 0.2)
     sPG.fft <- smoothedPG(Y, levels.1 = lev.ok.all, weight = weight,
     type = "clipped")
     W.fft.ci.mult <- getPointwiseCIs(sPG.fft)
     W.fft.coh.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherency")
     W.fft.cohsq.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherence")
     W.fft.sd.mult <- getSdNaive(sPG.fft)
     W.fft.coh.sd.1.mult <- getCoherencySdNaive(sPG.fft, type = "1")
     W.fft.coh.sd.2.mult <- getCoherencySdNaive(sPG.fft, type = "2")
     expect_equal(W.fft.ci.mult, W.fft.ci.mult.ref)
     expect_equal(W.fft.coh.ci.mult.ref, W.fft.coh.ci.mult)
     expect_equal(W.fft.cohsq.ci.mult.ref, W.fft.cohsq.ci.mult)
     expect_equal(W.fft.sd.mult.ref, W.fft.sd.mult.ref)
     expect_equal(W.fft.coh.sd.1.mult.ref, W.fft.coh.sd.1.mult.ref)
     expect_equal(W.fft.coh.sd.2.mult.ref, W.fft.coh.sd.2.mult.ref)
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 40: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 41: test_check("quantspec")
    
     --- value of length: 2 type: logical ---
     [1] TRUE FALSE
     --- function from context ---
     function (object, frequencies = 2 * pi/lenTS(object) * 0:(lenTS(object) -
     1), levels.1 = 0.5, levels.2 = levels.1, isRankBased = TRUE,
     type = c("clipped", "qr"), type.boot = c("none", "mbb"),
     method = c("br", "fn", "pfn", "fnc", "lasso", "scad"), parallel = FALSE,
     B = 0, l = 1, weight = kernelWeight())
     {
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     }
     else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     }
     else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     }
     else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     }
     else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     if (versConstr == 1) {
     levels.all <- union(levels.1, levels.2)
     K1 <- length(levels.1)
     K2 <- length(levels.2)
     J <- length(frequencies)
     qPG <- quantilePG(Y, frequencies = 2 * pi/lenTS(Y) *
     0:(lenTS(Y) - 1), levels.1 = levels.1, levels.2 = levels.2,
     isRankBased = isRankBased, type = type, type.boot = type.boot,
     B = B, l = l)
     }
     else if (versConstr == 2) {
     qPG <- object
     }
     obj <- new(Class = "SmoothedPG", qPG = qPG, weight = weight,
     frequencies = frequencies, levels = list(levels.1, levels.2))
     return(obj)
     }
     <bytecode: 0x5570320d67a0>
     <environment: namespace:quantspec>
     --- function search by body ---
     Function smoothedPG in namespace quantspec has this body.
     ----------- END OF FAILURE REPORT --------------
     ── 1. Error: multivariate functions work as expected (check against ref-results.
     the condition has length > 1
     Backtrace:
     1. quantspec::smoothedPG(...)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 83 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: multivariate functions work as expected (check against ref-results.rdata (@test-multivariate.R#132)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.2-1
Check: compiled code
Result: NOTE
    File ‘quantspec/libs/quantspec.so’:
     Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’
    
    It is good practice to register native routines and to disable symbol
    search.
    
    See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 1.2-1
Check: tests
Result: ERROR
     Running ‘test-all.R’ [15s/16s]
     Running ‘testthat.R’ [15s/18s]
    Running the tests in ‘tests/test-all.R’ failed.
    Complete output:
     > library(testthat)
     > library(quantspec)
     Loading required package: stats4
     >
     > #' @importFrom testthat test_package
     > test_check("quantspec")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     quantspec
     --- call from context ---
     smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     --- call from argument ---
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     } else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     } else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     } else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     } else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     --- R stacktrace ---
     where 1 at testthat/test-multivariate.R#132: smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-multivariate.R#119: test_that("multivariate functions work as expected (check against ref-results.rdata",
     {
     source("load-ref.R")
     set.seed(2581)
     Y1 <- ts1(16)
     Y2 <- ts1(16)
     Y <- matrix(c(Y1, Y2), ncol = 2)
     lev.ok.all <- c(0.25, 0.5, 0.75)
     weight = kernelWeight(W = W0, N = 64, bw = 0.2)
     sPG.fft <- smoothedPG(Y, levels.1 = lev.ok.all, weight = weight,
     type = "clipped")
     W.fft.ci.mult <- getPointwiseCIs(sPG.fft)
     W.fft.coh.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherency")
     W.fft.cohsq.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherence")
     W.fft.sd.mult <- getSdNaive(sPG.fft)
     W.fft.coh.sd.1.mult <- getCoherencySdNaive(sPG.fft, type = "1")
     W.fft.coh.sd.2.mult <- getCoherencySdNaive(sPG.fft, type = "2")
     expect_equal(W.fft.ci.mult, W.fft.ci.mult.ref)
     expect_equal(W.fft.coh.ci.mult.ref, W.fft.coh.ci.mult)
     expect_equal(W.fft.cohsq.ci.mult.ref, W.fft.cohsq.ci.mult)
     expect_equal(W.fft.sd.mult.ref, W.fft.sd.mult.ref)
     expect_equal(W.fft.coh.sd.1.mult.ref, W.fft.coh.sd.1.mult.ref)
     expect_equal(W.fft.coh.sd.2.mult.ref, W.fft.coh.sd.2.mult.ref)
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 40: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 41: test_check("quantspec")
    
     --- value of length: 2 type: logical ---
     [1] TRUE FALSE
     --- function from context ---
     function (object, frequencies = 2 * pi/lenTS(object) * 0:(lenTS(object) -
     1), levels.1 = 0.5, levels.2 = levels.1, isRankBased = TRUE,
     type = c("clipped", "qr"), type.boot = c("none", "mbb"),
     method = c("br", "fn", "pfn", "fnc", "lasso", "scad"), parallel = FALSE,
     B = 0, l = 1, weight = kernelWeight())
     {
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     }
     else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     }
     else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     }
     else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     }
     else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     if (versConstr == 1) {
     levels.all <- union(levels.1, levels.2)
     K1 <- length(levels.1)
     K2 <- length(levels.2)
     J <- length(frequencies)
     qPG <- quantilePG(Y, frequencies = 2 * pi/lenTS(Y) *
     0:(lenTS(Y) - 1), levels.1 = levels.1, levels.2 = levels.2,
     isRankBased = isRankBased, type = type, type.boot = type.boot,
     B = B, l = l)
     }
     else if (versConstr == 2) {
     qPG <- object
     }
     obj <- new(Class = "SmoothedPG", qPG = qPG, weight = weight,
     frequencies = frequencies, levels = list(levels.1, levels.2))
     return(obj)
     }
     <bytecode: 0x97d59c0>
     <environment: namespace:quantspec>
     --- function search by body ---
     Function smoothedPG in namespace quantspec has this body.
     ----------- END OF FAILURE REPORT --------------
     ── 1. Error: multivariate functions work as expected (check against ref-results.
     the condition has length > 1
     Backtrace:
     1. quantspec::smoothedPG(...)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 83 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: multivariate functions work as expected (check against ref-results.rdata (@test-multivariate.R#132)
    
     Error: testthat unit tests failed
     Execution halted
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > #library(quantspec)
     >
     > # importFrom testthat test_package
     > # test_package("quantspec")
     > test_check("quantspec")
     Loading required package: quantspec
     Loading required package: stats4
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     quantspec
     --- call from context ---
     smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     --- call from argument ---
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     } else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     } else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     } else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     } else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     --- R stacktrace ---
     where 1 at testthat/test-multivariate.R#132: smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-multivariate.R#119: test_that("multivariate functions work as expected (check against ref-results.rdata",
     {
     source("load-ref.R")
     set.seed(2581)
     Y1 <- ts1(16)
     Y2 <- ts1(16)
     Y <- matrix(c(Y1, Y2), ncol = 2)
     lev.ok.all <- c(0.25, 0.5, 0.75)
     weight = kernelWeight(W = W0, N = 64, bw = 0.2)
     sPG.fft <- smoothedPG(Y, levels.1 = lev.ok.all, weight = weight,
     type = "clipped")
     W.fft.ci.mult <- getPointwiseCIs(sPG.fft)
     W.fft.coh.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherency")
     W.fft.cohsq.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherence")
     W.fft.sd.mult <- getSdNaive(sPG.fft)
     W.fft.coh.sd.1.mult <- getCoherencySdNaive(sPG.fft, type = "1")
     W.fft.coh.sd.2.mult <- getCoherencySdNaive(sPG.fft, type = "2")
     expect_equal(W.fft.ci.mult, W.fft.ci.mult.ref)
     expect_equal(W.fft.coh.ci.mult.ref, W.fft.coh.ci.mult)
     expect_equal(W.fft.cohsq.ci.mult.ref, W.fft.cohsq.ci.mult)
     expect_equal(W.fft.sd.mult.ref, W.fft.sd.mult.ref)
     expect_equal(W.fft.coh.sd.1.mult.ref, W.fft.coh.sd.1.mult.ref)
     expect_equal(W.fft.coh.sd.2.mult.ref, W.fft.coh.sd.2.mult.ref)
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 40: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 41: test_check("quantspec")
    
     --- value of length: 2 type: logical ---
     [1] TRUE FALSE
     --- function from context ---
     function (object, frequencies = 2 * pi/lenTS(object) * 0:(lenTS(object) -
     1), levels.1 = 0.5, levels.2 = levels.1, isRankBased = TRUE,
     type = c("clipped", "qr"), type.boot = c("none", "mbb"),
     method = c("br", "fn", "pfn", "fnc", "lasso", "scad"), parallel = FALSE,
     B = 0, l = 1, weight = kernelWeight())
     {
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     }
     else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     }
     else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     }
     else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     }
     else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     if (versConstr == 1) {
     levels.all <- union(levels.1, levels.2)
     K1 <- length(levels.1)
     K2 <- length(levels.2)
     J <- length(frequencies)
     qPG <- quantilePG(Y, frequencies = 2 * pi/lenTS(Y) *
     0:(lenTS(Y) - 1), levels.1 = levels.1, levels.2 = levels.2,
     isRankBased = isRankBased, type = type, type.boot = type.boot,
     B = B, l = l)
     }
     else if (versConstr == 2) {
     qPG <- object
     }
     obj <- new(Class = "SmoothedPG", qPG = qPG, weight = weight,
     frequencies = frequencies, levels = list(levels.1, levels.2))
     return(obj)
     }
     <bytecode: 0x8485688>
     <environment: namespace:quantspec>
     --- function search by body ---
     Function smoothedPG in namespace quantspec has this body.
     ----------- END OF FAILURE REPORT --------------
     ── 1. Error: multivariate functions work as expected (check against ref-results.
     the condition has length > 1
     Backtrace:
     1. quantspec::smoothedPG(...)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 83 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: multivariate functions work as expected (check against ref-results.rdata (@test-multivariate.R#132)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 1.2-1
Check: tests
Result: ERROR
     Running ‘test-all.R’ [15s/17s]
     Running ‘testthat.R’ [15s/18s]
    Running the tests in ‘tests/test-all.R’ failed.
    Complete output:
     > library(testthat)
     > library(quantspec)
     Loading required package: stats4
     >
     > #' @importFrom testthat test_package
     > test_check("quantspec")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     quantspec
     --- call from context ---
     smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     --- call from argument ---
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     } else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     } else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     } else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     } else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     --- R stacktrace ---
     where 1 at testthat/test-multivariate.R#132: smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-multivariate.R#119: test_that("multivariate functions work as expected (check against ref-results.rdata",
     {
     source("load-ref.R")
     set.seed(2581)
     Y1 <- ts1(16)
     Y2 <- ts1(16)
     Y <- matrix(c(Y1, Y2), ncol = 2)
     lev.ok.all <- c(0.25, 0.5, 0.75)
     weight = kernelWeight(W = W0, N = 64, bw = 0.2)
     sPG.fft <- smoothedPG(Y, levels.1 = lev.ok.all, weight = weight,
     type = "clipped")
     W.fft.ci.mult <- getPointwiseCIs(sPG.fft)
     W.fft.coh.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherency")
     W.fft.cohsq.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherence")
     W.fft.sd.mult <- getSdNaive(sPG.fft)
     W.fft.coh.sd.1.mult <- getCoherencySdNaive(sPG.fft, type = "1")
     W.fft.coh.sd.2.mult <- getCoherencySdNaive(sPG.fft, type = "2")
     expect_equal(W.fft.ci.mult, W.fft.ci.mult.ref)
     expect_equal(W.fft.coh.ci.mult.ref, W.fft.coh.ci.mult)
     expect_equal(W.fft.cohsq.ci.mult.ref, W.fft.cohsq.ci.mult)
     expect_equal(W.fft.sd.mult.ref, W.fft.sd.mult.ref)
     expect_equal(W.fft.coh.sd.1.mult.ref, W.fft.coh.sd.1.mult.ref)
     expect_equal(W.fft.coh.sd.2.mult.ref, W.fft.coh.sd.2.mult.ref)
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 40: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 41: test_check("quantspec")
    
     --- value of length: 2 type: logical ---
     [1] TRUE FALSE
     --- function from context ---
     function (object, frequencies = 2 * pi/lenTS(object) * 0:(lenTS(object) -
     1), levels.1 = 0.5, levels.2 = levels.1, isRankBased = TRUE,
     type = c("clipped", "qr"), type.boot = c("none", "mbb"),
     method = c("br", "fn", "pfn", "fnc", "lasso", "scad"), parallel = FALSE,
     B = 0, l = 1, weight = kernelWeight())
     {
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     }
     else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     }
     else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     }
     else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     }
     else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     if (versConstr == 1) {
     levels.all <- union(levels.1, levels.2)
     K1 <- length(levels.1)
     K2 <- length(levels.2)
     J <- length(frequencies)
     qPG <- quantilePG(Y, frequencies = 2 * pi/lenTS(Y) *
     0:(lenTS(Y) - 1), levels.1 = levels.1, levels.2 = levels.2,
     isRankBased = isRankBased, type = type, type.boot = type.boot,
     B = B, l = l)
     }
     else if (versConstr == 2) {
     qPG <- object
     }
     obj <- new(Class = "SmoothedPG", qPG = qPG, weight = weight,
     frequencies = frequencies, levels = list(levels.1, levels.2))
     return(obj)
     }
     <bytecode: 0xa164668>
     <environment: namespace:quantspec>
     --- function search by body ---
     Function smoothedPG in namespace quantspec has this body.
     ----------- END OF FAILURE REPORT --------------
     ── 1. Error: multivariate functions work as expected (check against ref-results.
     the condition has length > 1
     Backtrace:
     1. quantspec::smoothedPG(...)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 83 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: multivariate functions work as expected (check against ref-results.rdata (@test-multivariate.R#132)
    
     Error: testthat unit tests failed
     Execution halted
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > #library(quantspec)
     >
     > # importFrom testthat test_package
     > # test_package("quantspec")
     > test_check("quantspec")
     Loading required package: quantspec
     Loading required package: stats4
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     quantspec
     --- call from context ---
     smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     --- call from argument ---
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     } else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     } else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     } else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     } else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     --- R stacktrace ---
     where 1 at testthat/test-multivariate.R#132: smoothedPG(Y, levels.1 = lev.ok.all, weight = weight, type = "clipped")
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 12: test_code(desc, code, env = parent.frame())
     where 13 at testthat/test-multivariate.R#119: test_that("multivariate functions work as expected (check against ref-results.rdata",
     {
     source("load-ref.R")
     set.seed(2581)
     Y1 <- ts1(16)
     Y2 <- ts1(16)
     Y <- matrix(c(Y1, Y2), ncol = 2)
     lev.ok.all <- c(0.25, 0.5, 0.75)
     weight = kernelWeight(W = W0, N = 64, bw = 0.2)
     sPG.fft <- smoothedPG(Y, levels.1 = lev.ok.all, weight = weight,
     type = "clipped")
     W.fft.ci.mult <- getPointwiseCIs(sPG.fft)
     W.fft.coh.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherency")
     W.fft.cohsq.ci.mult <- getPointwiseCIs(sPG.fft, quantity = "coherence")
     W.fft.sd.mult <- getSdNaive(sPG.fft)
     W.fft.coh.sd.1.mult <- getCoherencySdNaive(sPG.fft, type = "1")
     W.fft.coh.sd.2.mult <- getCoherencySdNaive(sPG.fft, type = "2")
     expect_equal(W.fft.ci.mult, W.fft.ci.mult.ref)
     expect_equal(W.fft.coh.ci.mult.ref, W.fft.coh.ci.mult)
     expect_equal(W.fft.cohsq.ci.mult.ref, W.fft.cohsq.ci.mult)
     expect_equal(W.fft.sd.mult.ref, W.fft.sd.mult.ref)
     expect_equal(W.fft.coh.sd.1.mult.ref, W.fft.coh.sd.1.mult.ref)
     expect_equal(W.fft.coh.sd.2.mult.ref, W.fft.coh.sd.2.mult.ref)
     })
     where 14: eval(code, test_env)
     where 15: eval(code, test_env)
     where 16: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 17: doTryCatch(return(expr), name, parentenv, handler)
     where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 22: tryCatchList(expr, classes, parentenv, handlers)
     where 23: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 24: test_code(NULL, exprs, env)
     where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 26: force(code)
     where 27: doWithOneRestart(return(expr), restart)
     where 28: withOneRestart(expr, restarts[[1L]])
     where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 30: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 31: FUN(X[[i]], ...)
     where 32: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 33: force(code)
     where 34: doWithOneRestart(return(expr), restart)
     where 35: withOneRestart(expr, restarts[[1L]])
     where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 37: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 39: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 40: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 41: test_check("quantspec")
    
     --- value of length: 2 type: logical ---
     [1] TRUE FALSE
     --- function from context ---
     function (object, frequencies = 2 * pi/lenTS(object) * 0:(lenTS(object) -
     1), levels.1 = 0.5, levels.2 = levels.1, isRankBased = TRUE,
     type = c("clipped", "qr"), type.boot = c("none", "mbb"),
     method = c("br", "fn", "pfn", "fnc", "lasso", "scad"), parallel = FALSE,
     B = 0, l = 1, weight = kernelWeight())
     {
     if (class(object) == "numeric" | class(object) == "matrix") {
     versConstr <- 1
     Y <- object
     }
     else if (class(object) == "ts") {
     versConstr <- 1
     Y <- object[1:length(object)]
     }
     else if (class(object) == "zoo") {
     versConstr <- 1
     Y <- coredata(object)
     }
     else if (class(object) == "QuantilePG") {
     versConstr <- 2
     if (!hasArg(frequencies)) {
     Y <- object@freqRep@Y
     frequencies <- 2 * pi/lenTS(Y) * 0:(lenTS(Y) - 1)
     }
     if (!hasArg(levels.1)) {
     levels.1 <- getLevels(object, 1)
     }
     if (!hasArg(levels.2)) {
     levels.2 <- getLevels(object, 2)
     }
     }
     else {
     stop("object is neither 'numeric', 'matrix', 'ts', 'zoo', nor 'QuantilePG'.")
     }
     if (versConstr == 1) {
     levels.all <- union(levels.1, levels.2)
     K1 <- length(levels.1)
     K2 <- length(levels.2)
     J <- length(frequencies)
     qPG <- quantilePG(Y, frequencies = 2 * pi/lenTS(Y) *
     0:(lenTS(Y) - 1), levels.1 = levels.1, levels.2 = levels.2,
     isRankBased = isRankBased, type = type, type.boot = type.boot,
     B = B, l = l)
     }
     else if (versConstr == 2) {
     qPG <- object
     }
     obj <- new(Class = "SmoothedPG", qPG = qPG, weight = weight,
     frequencies = frequencies, levels = list(levels.1, levels.2))
     return(obj)
     }
     <bytecode: 0x91db6e8>
     <environment: namespace:quantspec>
     --- function search by body ---
     Function smoothedPG in namespace quantspec has this body.
     ----------- END OF FAILURE REPORT --------------
     ── 1. Error: multivariate functions work as expected (check against ref-results.
     the condition has length > 1
     Backtrace:
     1. quantspec::smoothedPG(...)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     [ OK: 83 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
     1. Error: multivariate functions work as expected (check against ref-results.rdata (@test-multivariate.R#132)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc