Running 'testthat.R' [3s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(errors)
  > 
  > D <- function(expr, var) {
  +   if (identical(expr, quote(asinh(x))))
  +     quote(1 / sqrt(1 + x^2))
  +   else if (identical(expr, quote(acosh(x))))
  +     quote(1 / (sqrt(x - 1) * sqrt(x + 1)))
  +   else if (identical(expr, quote(atanh(x))))
  +     quote(1 / (1 - x^2))
  +   else
  +     stats::D(expr, as.character(var))
  + }
  > 
  > test_expr <- function(expr) {
  +   expr <- substitute(expr)
  +   x <- get("x", parent.frame())
  +   ex <- errors(x)
  +   ey <- exy <- 0
  +   if ("y" %in% as.list(expr)) {
  +     y <- get("y", parent.frame())
  +     ey <- errors(y)
  +     exy <- covar(x, y)
  +     if (is.null(exy)) exy <- 0
  +   }
  +   object <- eval(expr)
  +   dx <- as.numeric(eval(D(expr, "x")))
  +   dy <- as.numeric(eval(D(expr, "y")))
  +   expected <- set_errors(
  +     object, sqrt(dx^2 * ex^2 + dy^2 * ey^2 + 2 * dx * dy * exy)
  +   )
  +   expect_equal(object, expected)
  + }
  > 
  > test_check("errors")
  -- 1. Error: covariances are correctly stored, retrieved and removed (@test-corr
  value/errors(x)/errors(y) <= 1 are not all TRUE
  1: `correl<-`(`*tmp*`, y, value = 0.3) at testthat/test-correl.R:53
  2: `correl<-.errors`(`*tmp*`, y, value = 0.3)
  3: `covar<-`(`*tmp*`, y, value = value * errors(x) * errors(y))
  4: `covar<-.errors`(`*tmp*`, y, value = value * errors(x) * errors(y))
  5: stopifnot(value/errors(x)/errors(y) >= -1, value/errors(x)/errors(y) <= 1)
  
  -- 2. Error: pipe-friendly versions work as expected (@test-correl.R#86)  ------
  value/errors(x)/errors(y) <= 1 are not all TRUE
  1: expect_identical(set_correl(x, y, 0.3), x) at testthat/test-correl.R:86
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: set_correl(x, y, 0.3)
  5: set_correl.errors(x, y, 0.3)
  6: `correl<-`(`*tmp*`, y, value = value)
  7: `correl<-.errors`(`*tmp*`, y, value = value)
  8: `covar<-`(`*tmp*`, y, value = value * errors(x) * errors(y))
  9: `covar<-.errors`(`*tmp*`, y, value = value * errors(x) * errors(y))
  10: stopifnot(value/errors(x)/errors(y) >= -1, value/errors(x)/errors(y) <= 1)
  
  == testthat results  ===========================================================
  OK: 266 SKIPPED: 0 FAILED: 2
  1. Error: covariances are correctly stored, retrieved and removed (@test-correl.R#53) 
  2. Error: pipe-friendly versions work as expected (@test-correl.R#86) 
  
  Error: testthat unit tests failed
  Execution halted