Running 'testthat.R' [3s/4s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(rhoR)
  
  Attaching package: 'rhoR'
  
  The following object is masked from 'package:base':
  
      kappa
  
  > 
  > test_check("rhoR")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  rhoR
   --- call from context --- 
  rho(rho_set)
   --- call from argument --- 
  if (class(x) == "numeric") {
      if (is.null(OcSBaserate)) {
          stop("Must give a baserate when a kappa value is given")
      }
      if (is.null(testSetLength)) {
          stop("Must give a testSetLength when a kappa value is given")
      }
      result <- rhoK(x, OcSBaserate, testSetLength, testSetBaserateInflation, 
          OcSLength, replicates, ScSKappaThreshold, ScSKappaMin, 
          ScSPrecisionMin, ScSPrecisionMax)
  } else if (nrow(x) != 2) {
      result <- rhoSet(x, OcSBaserate, testSetBaserateInflation, 
          OcSLength, replicates, ScSKappaThreshold, ScSKappaMin, 
          ScSPrecisionMin, ScSPrecisionMax)
  } else {
      result <- rhoCT(x, OcSBaserate, testSetBaserateInflation, 
          OcSLength, replicates, ScSKappaThreshold, ScSKappaMin, 
          ScSPrecisionMin, ScSPrecisionMax)
  }
   --- R stacktrace ---
  where 1 at testthat/test-rho-returns-pr.R#6: rho(rho_set)
  where 2: eval(code, test_env)
  where 3: eval(code, test_env)
  where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
  where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 10: tryCatchList(expr, classes, parentenv, handlers)
  where 11: 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 12: test_code(desc, code, env = parent.frame())
  where 13 at testthat/test-rho-returns-pr.R#4: test_that("testing rho returns", {
      rho_set <- matrix(c(rep(1, times = 80), rep(0, times = 100)), 
          byrow = T, ncol = 2)
      rho_set_1 <- rho(rho_set)
      expect_equal(round(rho_set_1$recall, 2), 1)
      expect_equal(round(rho_set_1$precision, 2), 1)
      rho_ct <- matrix(c(30, 0, 0, 60), ncol = 2)
      rho_ct_1 <- rho(rho_ct)
      expect_equal(round(rho_ct_1$recall, 2), 1)
      expect_equal(round(rho_ct_1$precision, 2), 1)
  })
  where 14: eval(code, test_env)
  where 15: eval(code, test_env)
  where 16: 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 17: doTryCatch(return(expr), name, parentenv, handler)
  where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 19: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 22: tryCatchList(expr, classes, parentenv, handlers)
  where 23: 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 24: test_code(NULL, exprs, env)
  where 25: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 26: force(code)
  where 27: doWithOneRestart(return(expr), restart)
  where 28: withOneRestart(expr, restarts[[1L]])
  where 29: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 30: 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 31: FUN(X[[i]], ...)
  where 32: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 33: force(code)
  where 34: doWithOneRestart(return(expr), restart)
  where 35: withOneRestart(expr, restarts[[1L]])
  where 36: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 37: 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 38: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 39: 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 40: 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 41: test_check("rhoR")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (x, OcSBaserate = NULL, testSetLength = NULL, testSetBaserateInflation = 0, 
      OcSLength = 10000, replicates = 800, ScSKappaThreshold = 0.9, 
      ScSKappaMin = 0.4, ScSPrecisionMin = 0.6, ScSPrecisionMax = 1) 
  {
      if (class(x) == "numeric") {
          if (is.null(OcSBaserate)) {
              stop("Must give a baserate when a kappa value is given")
          }
          if (is.null(testSetLength)) {
              stop("Must give a testSetLength when a kappa value is given")
          }
          result <- rhoK(x, OcSBaserate, testSetLength, testSetBaserateInflation, 
              OcSLength, replicates, ScSKappaThreshold, ScSKappaMin, 
              ScSPrecisionMin, ScSPrecisionMax)
      }
      else if (nrow(x) != 2) {
          result <- rhoSet(x, OcSBaserate, testSetBaserateInflation, 
              OcSLength, replicates, ScSKappaThreshold, ScSKappaMin, 
              ScSPrecisionMin, ScSPrecisionMax)
      }
      else {
          result <- rhoCT(x, OcSBaserate, testSetBaserateInflation, 
              OcSLength, replicates, ScSKappaThreshold, ScSKappaMin, 
              ScSPrecisionMin, ScSPrecisionMax)
      }
      return(result)
  }
  <bytecode: 0xaf7a80>
  <environment: namespace:rhoR>
   --- function search by body ---
  Function rho in namespace rhoR has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1