Running 'testthat.R' [4s/5s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(DecisionAnalysis)
  > 
  > test_check("DecisionAnalysis")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  MAVF_breakout(SAVF_matrix, weights2, names)
   --- call from argument --- 
  if (class(SAVF_matrix) != "matrix") {
      stop("SAVF_matrix must be a matrix\n", "You have provided an object of the following class:\n", 
          "SAVF_matrix: ", class(SAVF_matrix), "\n")
  }
   --- R stacktrace ---
  where 1: MAVF_breakout(SAVF_matrix, weights2, names)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      cnd <- cnd_entrace(cnd)
      return_from(env, cnd)
  })
  where 4: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 5: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 6 at testthat/test_MAVF_breakout.R#21: expect_error(MAVF_breakout(SAVF_matrix, weights2, names))
  where 7: eval(code, test_env)
  where 8: eval(code, test_env)
  where 9: 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 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 12: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 13: doTryCatch(return(expr), name, parentenv, handler)
  where 14: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 15: tryCatchList(expr, classes, parentenv, handlers)
  where 16: 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 17: test_code(desc, code, env = parent.frame())
  where 18 at testthat/test_MAVF_breakout.R#18: test_that("MAVF_breakout provides proper messages and warnings", 
      {
          expect_error(MAVF_breakout(SAVF_matrix, weights, names))
          SAVF_matrix <- as.matrix(SAVF_matrix)
          expect_error(MAVF_breakout(SAVF_matrix, weights2, names))
          expect_error(MAVF_breakout(SAVF_matrix, weights = SAVF_matrix, 
              names))
          expect_error(MAVF_breakout(SAVF_matrix[, 1:6], weights, 
              names))
          expect_error(MAVF_breakout(SAVF_matrix, weights, c("Greg McElroy", 
              "Blaine Gabbert", "Christian Ponder")))
          expect_warning(MAVF_breakout(SAVF_matrix, c(0.096, 0.224, 
              0.092, 0.138, 0.15, 0.22, 0.05), names))
          expect_warning(MAVF_breakout(SAVF_matrix, c(0.096, 0.224, 
              0.092, 0.155, 0.175, 0.228, 0.15), names))
      })
  where 19: eval(code, test_env)
  where 20: eval(code, test_env)
  where 21: 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 22: doTryCatch(return(expr), name, parentenv, handler)
  where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 25: doTryCatch(return(expr), name, parentenv, handler)
  where 26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 27: tryCatchList(expr, classes, parentenv, handlers)
  where 28: 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 29: test_code(NULL, exprs, env)
  where 30: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 31: force(code)
  where 32: doWithOneRestart(return(expr), restart)
  where 33: withOneRestart(expr, restarts[[1L]])
  where 34: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 35: 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 36: FUN(X[[i]], ...)
  where 37: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 38: force(code)
  where 39: doWithOneRestart(return(expr), restart)
  where 40: withOneRestart(expr, restarts[[1L]])
  where 41: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 42: 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 43: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 44: 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 45: 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 46: test_check("DecisionAnalysis")
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (SAVF_matrix, weights, names) 
  {
      if (class(SAVF_matrix) != "matrix") {
          stop("SAVF_matrix must be a matrix\n", "You have provided an object of the following class:\n", 
              "SAVF_matrix: ", class(SAVF_matrix), "\n")
      }
      if (class(weights) != "numeric") {
          stop("weights must be of class numeric\n", "You have provided an object of the following class:\n", 
              "weights: ", class(weights))
      }
      if (sum(weights) < 1) {
          warning("The sum of weights is less than 1")
      }
      if (sum(weights) > 1) {
          warning("The sum of weights is greater than 1")
      }
      if (ncol(SAVF_matrix) != length(weights)) {
          stop("The number of columns in the SAVF matrix must equal the length of the vector of weights")
      }
      if (nrow(SAVF_matrix) != length(names)) {
          stop("The number of rows in the SAVF matrix must equal the length of the vector of names")
      }
      Measurement <- dplyr::quo(Measurement)
      Value <- dplyr::quo(Value)
      SAVF_matrix[is.na(SAVF_matrix)] <- 0
      SAVF <- t(SAVF_matrix) * weights
      MAVF = SAVF_matrix %*% weights
      value <- data.frame(names, MAVF, t(SAVF))
      `%>%` <- dplyr::`%>%`
      value %>% tidyr::gather(Measurement, Value, -c(1:2)) %>% 
          dplyr::group_by(Measurement) %>% ggplot2::ggplot(ggplot2::aes(x = stats::reorder(names, 
          MAVF), y = Value, fill = Measurement)) + ggplot2::geom_bar(stat = "identity") + 
          ggplot2::coord_flip() + ggplot2::ylab("Weighted SAVF Scores") + 
          ggplot2::xlab("Alternatives") + ggplot2::ggtitle("Breakout of Weighted SAVF")
  }
  <bytecode: 0xa9bc98>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function MAVF_breakout in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1