Running 'test-all.R' [13s/14s]
  Running 'testthat.R' [12s/13s]
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: 0xd7044b8>
  <environment: namespace:quantspec>
   --- function search by body ---
  Function smoothedPG in namespace quantspec has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1
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: 0xdec46f8>
  <environment: namespace:quantspec>
   --- function search by body ---
  Function smoothedPG in namespace quantspec has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1