Running 'testthat.R' [4s/4s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(PCAmatchR)
  > 
  > test_check("PCAmatchR")
  -- ERROR (test-match_maker.R:81:3): match_maker works --------------------------
  Error: cannot xtfrm 'x'
  Backtrace:
       x
    1. +-testthat::expect_named(...) test-match_maker.R:81:2
    2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. \-PCAmatchR::match_maker(...)
    5.   +-PC_combine[order(-PC_combine[case_control]), ]
    6.   +-base::`[.data.frame`(...)
    7.   \-base::order(-PC_combine[case_control])
    8.     \-base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
    9.       \-base:::FUN(X[[i]], ...)
   10.         +-base::as.vector(xtfrm(x))
   11.         +-base::xtfrm(x)
   12.         \-base::xtfrm.default(x)
  
  -- ERROR (test-match_maker.R:94:3): matches has correct dimensions -------------
  Error: cannot xtfrm 'x'
  Backtrace:
      x
   1. \-PCAmatchR::match_maker(...) test-match_maker.R:94:2
   2.   +-PC_combine[order(-PC_combine[case_control]), ]
   3.   +-base::`[.data.frame`(...)
   4.   \-base::order(-PC_combine[case_control])
   5.     \-base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   6.       \-base:::FUN(X[[i]], ...)
   7.         +-base::as.vector(xtfrm(x))
   8.         +-base::xtfrm(x)
   9.         \-base::xtfrm.default(x)
  
  -- ERROR (test-match_maker.R:107:3): weights has correct dimension -------------
  Error: cannot xtfrm 'x'
  Backtrace:
      x
   1. \-PCAmatchR::match_maker(...) test-match_maker.R:107:2
   2.   +-PC_combine[order(-PC_combine[case_control]), ]
   3.   +-base::`[.data.frame`(...)
   4.   \-base::order(-PC_combine[case_control])
   5.     \-base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   6.       \-base:::FUN(X[[i]], ...)
   7.         +-base::as.vector(xtfrm(x))
   8.         +-base::xtfrm(x)
   9.         \-base::xtfrm.default(x)
  
  -- ERROR (test-plot_maker.R:21:2): (code run outside of `test_that()`) ---------
  Error: cannot xtfrm 'x'
  Backtrace:
      x
   1. \-PCAmatchR::match_maker(...) test-plot_maker.R:21:1
   2.   +-PC_combine[order(-PC_combine[case_control]), ]
   3.   +-base::`[.data.frame`(...)
   4.   \-base::order(-PC_combine[case_control])
   5.     \-base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   6.       \-base:::FUN(X[[i]], ...)
   7.         +-base::as.vector(xtfrm(x))
   8.         +-base::xtfrm(x)
   9.         \-base::xtfrm.default(x)
  
  == testthat results  ===========================================================
  ERROR (test-match_maker.R:81:3): match_maker works
  ERROR (test-match_maker.R:94:3): matches has correct dimensions
  ERROR (test-match_maker.R:107:3): weights has correct dimension
  ERROR (test-plot_maker.R:21:2): (code run outside of `test_that()`)
  
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 6 ]
  Error: Test failures
  Execution halted