Running 'testthat.R' [160s/178s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(MFPCA)
  Loading required package: funData
  
  Attaching package: 'funData'
  
  The following object is masked from 'package:stats':
  
      integrate
  
  > 
  > test_check("MFPCA")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
   at testthat/test_fftw.R#121: 
   --- package (from environment) --- 
  MFPCA
   --- call from context --- 
  eval(code, test_env)
   --- call from argument --- 
  if (class(idct2D) == "try-error") expect_error(stop(idct2D), 
      "dctBasis2D requires C-library fftw3 to be installed. Check http://www.fftw.org/ for more information.") else {
      skip_on_cran()
      expect_equal(dim(idct2D), c(10, 20))
      expect_equal(mean(idct2D), 0)
      expect_equal(idct2D[1, 1], 1.0897, tolerance = 1e-05)
      expect_equal(MFPCA:::idct2D(scores = NULL, ind = NULL, dim = c(5, 
          5)), array(0, dim = c(5, 5)))
  }
   --- R stacktrace ---
  where 1: eval(code, test_env)
  where 2: eval(code, test_env)
  where 3: 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 4: doTryCatch(return(expr), name, parentenv, handler)
  where 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 6: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 9: tryCatchList(expr, classes, parentenv, handlers)
  where 10: 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 11: test_code(desc, code, env = parent.frame())
  where 12 at testthat/test_fftw.R#104: test_that("Test fftw: IDCT", {
      suppressWarnings(RNGversion("3.5.0"))
      set.seed(4)
      scores <- rnorm(25, sd = 25:1/25)
      expect_error(MFPCA:::idct2D(scores = scores, ind = 1:25, 
          dim = 50), "Function idct2D can handle only 2D images.")
      expect_error(MFPCA:::idct2D(scores = scores, ind = 1:20, 
          dim = c(5, 5)), "Indices do not match number of scores.")
      expect_error(MFPCA:::idct2D(scores = scores, ind = 0:24, 
          dim = c(10, 20)), "Indices must be positive.")
      expect_error(MFPCA:::idct2D(scores = scores, ind = 200 + 
          0:24, dim = c(10, 20)), "Index exceeds image dimensions.")
      expect_error(MFPCA:::idct3D(scores = scores, ind = 1:25, 
          dim = 50), "Function idct3D can handle only 3D images.")
      expect_error(MFPCA:::idct3D(scores = scores, ind = 1:20, 
          dim = c(5, 5, 5)), "Indices do not match number of scores.")
      expect_error(MFPCA:::idct3D(scores = scores, ind = 0:24, 
          dim = c(10, 20, 30)), "Indices must be positive.")
      expect_error(MFPCA:::idct3D(scores = scores, ind = 2000 + 
          0:24, dim = c(10, 20, 10)), "Index exceeds image dimensions.")
      idct2D <- try(MFPCA:::idct2D(scores = scores, ind = sample(200, 
          25), dim = c(10, 20)), silent = TRUE)
      if (class(idct2D) == "try-error") 
          expect_error(stop(idct2D), "dctBasis2D requires C-library fftw3 to be installed. Check http://www.fftw.org/ for more information.")
      else {
          skip_on_cran()
          expect_equal(dim(idct2D), c(10, 20))
          expect_equal(mean(idct2D), 0)
          expect_equal(idct2D[1, 1], 1.0897, tolerance = 1e-05)
          expect_equal(MFPCA:::idct2D(scores = NULL, ind = NULL, 
              dim = c(5, 5)), array(0, dim = c(5, 5)))
      }
      idct3D <- try(MFPCA:::idct3D(scores = scores, ind = sample(2000, 
          25), dim = c(10, 20, 10)), silent = TRUE)
      if (class(idct3D) == "try-error") 
          expect_error(stop(idct3D), "dctBasis3D requires C-library fftw3 to be installed. Check http://www.fftw.org/ for more information.")
      else {
          skip_on_cran()
          expect_equal(dim(idct3D), c(10, 20, 10))
          expect_equal(mean(idct3D), 0)
          expect_equal(idct3D[1, 1, 1], 0.87795, tolerance = 1e-05)
          expect_equal(MFPCA:::idct3D(scores = NULL, ind = NULL, 
              dim = c(5, 5, 5)), array(0, c(5, 5, 5)))
      }
  })
  where 13: eval(code, test_env)
  where 14: eval(code, test_env)
  where 15: 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 16: doTryCatch(return(expr), name, parentenv, handler)
  where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 18: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 19: doTryCatch(return(expr), name, parentenv, handler)
  where 20: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 21: tryCatchList(expr, classes, parentenv, handlers)
  where 22: 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 23: test_code(NULL, exprs, env)
  where 24: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 25: force(code)
  where 26: doWithOneRestart(return(expr), restart)
  where 27: withOneRestart(expr, restarts[[1L]])
  where 28: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 29: 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 30: FUN(X[[i]], ...)
  where 31: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 32: force(code)
  where 33: doWithOneRestart(return(expr), restart)
  where 34: withOneRestart(expr, restarts[[1L]])
  where 35: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 36: 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 37: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 38: 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 39: 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 40: test_check("MFPCA")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
   --- function search by body ---
   ----------- END OF FAILURE REPORT -------------- 
  -- 1. Error: Test fftw: IDCT (@test_fftw.R#121)  -------------------------------
  the condition has length > 1
  
  == testthat results  ===========================================================
  [ OK: 403 | SKIPPED: 6 | WARNINGS: 2 | FAILED: 1 ]
  1. Error: Test fftw: IDCT (@test_fftw.R#121) 
  
  Error: testthat unit tests failed
  Execution halted