Package check result: ERROR Check: examples, Result: ERROR Running examples in ‘robcp-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: cor_cusum > ### Title: A CUSUM-type test to detect changes in the correlation. > ### Aliases: cor_cusum > > ### ** Examples > > ### first: generate a time series with a burn-in period of m and a change point > ### k = n/2 > require(mvtnorm) Loading required package: mvtnorm Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘mvtnorm’ > n <- 500 > m <- 100 > N <- n + m > k <- m + floor(n * 0.5) > n1 <- N - k > > ## Spearman's rho: > rho <- c(0.4, -0.9) > > # serial dependence: > theta1 <- 0.3 > theta2 <- 0.2 > theta <- cbind(c(theta1, 0), c(0, theta2)) > q <- rho * sqrt( (theta1^2 + 1) * (theta2^2 + 1) / (theta1 * theta2 + 1)) > # shape matrices of the innovations: > S0 <- cbind(c(1, q[1]), c(q[1], 1)) > S1 <- cbind(c(1, q[2]), c(q[2], 1)) > > e0 <- rmvt(k, S0, 5) Error in rmvt(k, S0, 5) : could not find function "rmvt" Execution halted Check: tests, Result: ERROR Running ‘testthat.R’ [9s/9s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > #library(robcp) > > test_check("robcp") Loading required package: robcp [ FAIL 2 | WARN 2 | SKIP 4 | PASS 252 ] ══ Skipped tests (4) ═══════════════════════════════════════════════════════════ • On CRAN (4): 'test-Hodges_Lehmann.R:77:3', 'test-Wilcox.R:95:3', 'test-huber_cusum.R:20:3', 'test-pKSdist.R:20:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-CUSUM.R:57:3'): CUSUM test statistic is computed correctly ───── Error in `ginv(sigma)`: could not find function "ginv" ── Error ('test-cor.R:85:5'): CUSUM test for changes in the scale is performed correctly ── Error in `rmvt(k, S0, 5)`: could not find function "rmvt" Backtrace: ▆ 1. └─base::replicate(...) at test-cor.R:83:3 2. └─base::sapply(...) 3. └─base::lapply(X = X, FUN = FUN, ...) 4. └─robcp (local) FUN(X[[i]], ...) [ FAIL 2 | WARN 2 | SKIP 4 | PASS 252 ] Error: Test failures Execution halted