Running ‘testthat.R’ [2s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(PeerPerformance)
  Loading required package: parallel
  Loading required package: sandwich
  Loading required package: lmtest
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  Loading required package: compiler
  > 
  > test_check("PeerPerformance")
  ── 1. Error: Alpha (@test_screening.R#13)  ─────────────────────────────────────
  argument "X" is missing, with no default
  Backtrace:
   1. PeerPerformance::alphaScreening(rets, control = list(nCore = 1))
   2. PeerPerformance:::infoFund(X, factors = factors)
   3. base::sweep(x = X, MARGIN = 2, STATS = muX, FUN = "-")
  
  ── 2. Error: Sharpe (@test_screening.R#39)  ────────────────────────────────────
  9 nodes produced errors; first error: argument "X" is missing, with no default
  Backtrace:
   1. PeerPerformance::sharpeScreening(rets, control = list(nCore = 1))
   2. parallel::clusterApplyLB(...)
   3. parallel:::dynamicClusterApply(cl, fun, length(x), argfun)
   4. parallel:::checkForRemoteErrors(val)
  
  ── 3. Error: Modified Sharpe (@test_screening.R#65)  ───────────────────────────
  9 nodes produced errors; first error: argument "X" is missing, with no default
  Backtrace:
   1. PeerPerformance::msharpeScreening(rets, level = 0.9, control = list(nCore = 1))
   2. parallel::clusterApplyLB(...)
   3. parallel:::dynamicClusterApply(cl, fun, length(x), argfun)
   4. parallel:::checkForRemoteErrors(val)
  
  ── 4. Error: Sharpe and modified Sharpe (@test_testing.R#15)  ──────────────────
  argument "X" is missing, with no default
  Backtrace:
   1. PeerPerformance::sharpe(hfdata)
   2. PeerPerformance:::.sharpe(X, na.rm)
   3. base::sweep(x = X, MARGIN = 2, STATS = mu.hat, FUN = "-")
  
  ── 5. Error: Sharpe testing (@test_testing.R#25)  ──────────────────────────────
  argument "X" is missing, with no default
  Backtrace:
   1. PeerPerformance::sharpeTesting(x, y, control = list())
   2. PeerPerformance:::sharpeTestAsymptotic(rets, ctr$hac, ctr$ttype)
   3. PeerPerformance:::sharpe.ratio.diff(rets, Y = NULL, ttype)
   4. base::sweep(x = X, MARGIN = 2, STATS = mu1.hat, FUN = "-")
  
  ── 6. Error: Modified Sharpe testing (@test_testing.R#39)  ─────────────────────
  argument "X" is missing, with no default
  Backtrace:
   1. PeerPerformance::msharpeTesting(x, y, control = list())
   2. PeerPerformance:::msharpeTestAsymptotic(...)
   3. PeerPerformance:::msharpe.ratio.diff(...)
   4. base::sweep(x = X, MARGIN = 2, STATS = m1X, FUN = "-")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 0 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 6 ]
  1. Error: Alpha (@test_screening.R#13) 
  2. Error: Sharpe (@test_screening.R#39) 
  3. Error: Modified Sharpe (@test_screening.R#65) 
  4. Error: Sharpe and modified Sharpe (@test_testing.R#15) 
  5. Error: Sharpe testing (@test_testing.R#25) 
  6. Error: Modified Sharpe testing (@test_testing.R#39) 
  
  Error: testthat unit tests failed
  In addition: Warning messages:
  1: In topenv(env) : closing unused connection 5 (<-localhost:11790)
  2: In topenv(env) : closing unused connection 4 (<-localhost:11790)
  Execution halted