Running ‘testthat.R’ [5s/7s]
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) {
      if (can_entrace(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: 0x5624a66e7b90>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function MAVF_breakout in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  MAVF_breakout(SAVF_matrix, weights = SAVF_matrix, 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, weights = SAVF_matrix, names)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(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#22: expect_error(MAVF_breakout(SAVF_matrix, weights = SAVF_matrix, 
      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: 0x5624a66e7b90>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function MAVF_breakout in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  MAVF_breakout(SAVF_matrix[, 1:6], weights, 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[, 1:6], weights, names)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(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#23: expect_error(MAVF_breakout(SAVF_matrix[, 1:6], weights, 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: 0x5624a66e7b90>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function MAVF_breakout in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  MAVF_breakout(SAVF_matrix, weights, c("Greg McElroy", "Blaine Gabbert", 
      "Christian Ponder"))
   --- 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, weights, c("Greg McElroy", "Blaine Gabbert", 
      "Christian Ponder"))
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(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#24: expect_error(MAVF_breakout(SAVF_matrix, weights, c("Greg McElroy", 
      "Blaine Gabbert", "Christian Ponder")))
  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: 0x5624a66e7b90>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function MAVF_breakout in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  MAVF_breakout(SAVF_matrix, c(0.096, 0.224, 0.092, 0.138, 0.15, 
      0.22, 0.05), 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, c(0.096, 0.224, 0.092, 0.138, 0.15, 
      0.22, 0.05), names)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers(code, warning = function(condition) {
      out$push(condition)
      maybe_restart("muffleWarning")
  })
  where 4: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 5: quasi_capture(enquo(object), label, capture_warnings)
  where 6 at testthat/test_MAVF_breakout.R#25: expect_warning(MAVF_breakout(SAVF_matrix, c(0.096, 0.224, 0.092, 
      0.138, 0.15, 0.22, 0.05), 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: 0x5624a66e7b90>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function MAVF_breakout in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 1. Error: MAVF_breakout provides proper messages and warnings (@test_MAVF_bre
  the condition has length > 1
  Backtrace:
   1. testthat::expect_warning(...)
   6. DecisionAnalysis::MAVF_breakout(...)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  MAVF_Scores(SAVF_matrix[, 1:6], weights, 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_Scores(SAVF_matrix[, 1:6], weights, names)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(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_scores.R#23: expect_error(MAVF_Scores(SAVF_matrix[, 1:6], weights, 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_scores.R#18: test_that("MAVF_scores provides proper messages and warnings", 
      {
          expect_error(MAVF_Scores(SAVF_matrix, weights, names))
          SAVF_matrix <- as.matrix(SAVF_matrix)
          expect_error(MAVF_scores(SAVF_matrix, weights2, names))
          expect_error(MAVF_scores(SAVF_matrix, weights = SAVF_matrix, 
              names))
          expect_error(MAVF_Scores(SAVF_matrix[, 1:6], weights, 
              names))
          expect_error(MAVF_Scores(SAVF_matrix, weights, c("Greg McElroy", 
              "Blaine Gabbert", "Christian Ponder")))
          expect_warning(MAVF_Scores(SAVF_matrix, c(0.096, 0.224, 
              0.092, 0.138, 0.15, 0.22, 0.05), names))
          expect_warning(MAVF_Scores(SAVF_matrix, c(0.096, 0.224, 
              0.092, 0.155, 0.175, 0.228, 0.15), names))
          expect_error(MAVF_Scores(SAVF_matrix, c("0.096", "0.224", 
              "0.092", "0.138", "0.152", "0.228", "0.07"), 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) != "matrix") {
          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")
          }
      }
      SAVF_matrix[is.na(SAVF_matrix)] <- 0
      MAVF = SAVF_matrix %*% weights
      value <- data.frame(names, MAVF)
      names(value) <- c("Name", "Score")
      value <- value[order(value$Score, decreasing = TRUE), ]
      return(value)
  }
  <bytecode: 0x5624a671e760>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function MAVF_Scores in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  MAVF_Scores(SAVF_matrix, weights, c("Greg McElroy", "Blaine Gabbert", 
      "Christian Ponder"))
   --- 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_Scores(SAVF_matrix, weights, c("Greg McElroy", "Blaine Gabbert", 
      "Christian Ponder"))
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(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_scores.R#24: expect_error(MAVF_Scores(SAVF_matrix, weights, c("Greg McElroy", 
      "Blaine Gabbert", "Christian Ponder")))
  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_scores.R#18: test_that("MAVF_scores provides proper messages and warnings", 
      {
          expect_error(MAVF_Scores(SAVF_matrix, weights, names))
          SAVF_matrix <- as.matrix(SAVF_matrix)
          expect_error(MAVF_scores(SAVF_matrix, weights2, names))
          expect_error(MAVF_scores(SAVF_matrix, weights = SAVF_matrix, 
              names))
          expect_error(MAVF_Scores(SAVF_matrix[, 1:6], weights, 
              names))
          expect_error(MAVF_Scores(SAVF_matrix, weights, c("Greg McElroy", 
              "Blaine Gabbert", "Christian Ponder")))
          expect_warning(MAVF_Scores(SAVF_matrix, c(0.096, 0.224, 
              0.092, 0.138, 0.15, 0.22, 0.05), names))
          expect_warning(MAVF_Scores(SAVF_matrix, c(0.096, 0.224, 
              0.092, 0.155, 0.175, 0.228, 0.15), names))
          expect_error(MAVF_Scores(SAVF_matrix, c("0.096", "0.224", 
              "0.092", "0.138", "0.152", "0.228", "0.07"), 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) != "matrix") {
          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")
          }
      }
      SAVF_matrix[is.na(SAVF_matrix)] <- 0
      MAVF = SAVF_matrix %*% weights
      value <- data.frame(names, MAVF)
      names(value) <- c("Name", "Score")
      value <- value[order(value$Score, decreasing = TRUE), ]
      return(value)
  }
  <bytecode: 0x5624a671e760>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function MAVF_Scores in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  MAVF_Scores(SAVF_matrix, c(0.096, 0.224, 0.092, 0.138, 0.15, 
      0.22, 0.05), 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_Scores(SAVF_matrix, c(0.096, 0.224, 0.092, 0.138, 0.15, 
      0.22, 0.05), names)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers(code, warning = function(condition) {
      out$push(condition)
      maybe_restart("muffleWarning")
  })
  where 4: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 5: quasi_capture(enquo(object), label, capture_warnings)
  where 6 at testthat/test_MAVF_scores.R#25: expect_warning(MAVF_Scores(SAVF_matrix, c(0.096, 0.224, 0.092, 
      0.138, 0.15, 0.22, 0.05), 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_scores.R#18: test_that("MAVF_scores provides proper messages and warnings", 
      {
          expect_error(MAVF_Scores(SAVF_matrix, weights, names))
          SAVF_matrix <- as.matrix(SAVF_matrix)
          expect_error(MAVF_scores(SAVF_matrix, weights2, names))
          expect_error(MAVF_scores(SAVF_matrix, weights = SAVF_matrix, 
              names))
          expect_error(MAVF_Scores(SAVF_matrix[, 1:6], weights, 
              names))
          expect_error(MAVF_Scores(SAVF_matrix, weights, c("Greg McElroy", 
              "Blaine Gabbert", "Christian Ponder")))
          expect_warning(MAVF_Scores(SAVF_matrix, c(0.096, 0.224, 
              0.092, 0.138, 0.15, 0.22, 0.05), names))
          expect_warning(MAVF_Scores(SAVF_matrix, c(0.096, 0.224, 
              0.092, 0.155, 0.175, 0.228, 0.15), names))
          expect_error(MAVF_Scores(SAVF_matrix, c("0.096", "0.224", 
              "0.092", "0.138", "0.152", "0.228", "0.07"), 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) != "matrix") {
          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")
          }
      }
      SAVF_matrix[is.na(SAVF_matrix)] <- 0
      MAVF = SAVF_matrix %*% weights
      value <- data.frame(names, MAVF)
      names(value) <- c("Name", "Score")
      value <- value[order(value$Score, decreasing = TRUE), ]
      return(value)
  }
  <bytecode: 0x5624a671e760>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function MAVF_Scores in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 2. Error: MAVF_scores provides proper messages and warnings (@test_MAVF_score
  the condition has length > 1
  Backtrace:
   1. testthat::expect_warning(...)
   6. DecisionAnalysis::MAVF_Scores(...)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  MAVF_Scores(SAVF_matrix, weights, 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_Scores(SAVF_matrix, weights, names)
  where 2: eval_bare(expr, quo_get_env(quo))
  where 3: quasi_label(enquo(object), label, arg = "object")
  where 4 at testthat/test_MAVF_scores.R#33: expect_is(MAVF_Scores(SAVF_matrix, weights, names), "data.frame")
  where 5: eval(code, test_env)
  where 6: eval(code, test_env)
  where 7: 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 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 11: doTryCatch(return(expr), name, parentenv, handler)
  where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 13: tryCatchList(expr, classes, parentenv, handlers)
  where 14: 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 15: test_code(desc, code, env = parent.frame())
  where 16 at testthat/test_MAVF_scores.R#32: test_that("MAVF_scores has correct dimensions and output type", 
      {
          expect_is(MAVF_Scores(SAVF_matrix, weights, names), "data.frame")
          expect_length(MAVF_Scores(SAVF_matrix, weights, names), 
              2)
      })
  where 17: eval(code, test_env)
  where 18: eval(code, test_env)
  where 19: 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 20: doTryCatch(return(expr), name, parentenv, handler)
  where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 25: tryCatchList(expr, classes, parentenv, handlers)
  where 26: 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 27: test_code(NULL, exprs, env)
  where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 29: force(code)
  where 30: doWithOneRestart(return(expr), restart)
  where 31: withOneRestart(expr, restarts[[1L]])
  where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 33: 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 34: FUN(X[[i]], ...)
  where 35: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 36: force(code)
  where 37: doWithOneRestart(return(expr), restart)
  where 38: withOneRestart(expr, restarts[[1L]])
  where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 40: 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 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 42: 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 43: 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 44: 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) != "matrix") {
          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")
          }
      }
      SAVF_matrix[is.na(SAVF_matrix)] <- 0
      MAVF = SAVF_matrix %*% weights
      value <- data.frame(names, MAVF)
      names(value) <- c("Name", "Score")
      value <- value[order(value$Score, decreasing = TRUE), ]
      return(value)
  }
  <bytecode: 0x5624a671e760>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function MAVF_Scores in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 3. Error: MAVF_scores has correct dimensions and output type (@test_MAVF_scor
  the condition has length > 1
  Backtrace:
   1. testthat::expect_is(...)
   4. DecisionAnalysis::MAVF_Scores(SAVF_matrix, weights, names)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  MAVF_Scores(SAVF_matrix, weights, 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_Scores(SAVF_matrix, weights, names)
  where 2: as.matrix(MAVF_Scores(SAVF_matrix, weights, names))
  where 3: eval_bare(expr, quo_get_env(quo))
  where 4: quasi_label(enquo(object), label, arg = "object")
  where 5 at testthat/test_MAVF_scores.R#50: expect_equivalent(as.matrix(MAVF_Scores(SAVF_matrix, weights, 
      names)), as.matrix(test1answer))
  where 6: eval(code, test_env)
  where 7: eval(code, test_env)
  where 8: 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 9: doTryCatch(return(expr), name, parentenv, handler)
  where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 12: doTryCatch(return(expr), name, parentenv, handler)
  where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 14: tryCatchList(expr, classes, parentenv, handlers)
  where 15: 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 16: test_code(desc, code, env = parent.frame())
  where 17 at testthat/test_MAVF_scores.R#49: test_that("MAVF_Scores computes correctly", {
      expect_equivalent(as.matrix(MAVF_Scores(SAVF_matrix, weights, 
          names)), as.matrix(test1answer))
  })
  where 18: eval(code, test_env)
  where 19: eval(code, test_env)
  where 20: 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 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 24: doTryCatch(return(expr), name, parentenv, handler)
  where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 26: tryCatchList(expr, classes, parentenv, handlers)
  where 27: 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 28: test_code(NULL, exprs, env)
  where 29: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 30: force(code)
  where 31: doWithOneRestart(return(expr), restart)
  where 32: withOneRestart(expr, restarts[[1L]])
  where 33: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 34: 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 35: FUN(X[[i]], ...)
  where 36: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 37: force(code)
  where 38: doWithOneRestart(return(expr), restart)
  where 39: withOneRestart(expr, restarts[[1L]])
  where 40: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 41: 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 42: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: 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 44: 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 45: 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) != "matrix") {
          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")
          }
      }
      SAVF_matrix[is.na(SAVF_matrix)] <- 0
      MAVF = SAVF_matrix %*% weights
      value <- data.frame(names, MAVF)
      names(value) <- c("Name", "Score")
      value <- value[order(value$Score, decreasing = TRUE), ]
      return(value)
  }
  <bytecode: 0x5624a671e760>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function MAVF_Scores in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 4. Error: MAVF_Scores computes correctly (@test_MAVF_scores.R#50)  ──────────
  the condition has length > 1
  Backtrace:
   1. testthat::expect_equivalent(...)
   5. DecisionAnalysis::MAVF_Scores(SAVF_matrix, weights, names)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  sensitivity_plot(SAVF_matrix, weights2, names, 4)
   --- 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: sensitivity_plot(SAVF_matrix, weights2, names, 4)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(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_sensitivity_plot.R#21: expect_error(sensitivity_plot(SAVF_matrix, weights2, names, 4))
  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_sensitivity_plot.R#18: test_that("sensitivity_plot provides proper messages and warnings", 
      {
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              4))
          SAVF_matrix <- as.matrix(SAVF_matrix)
          expect_error(sensitivity_plot(SAVF_matrix, weights2, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix, weights = SAVF_matrix, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix[, 1:6], weights, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix, weights, c("Greg McElroy", 
              "Blaine Gabbert", "Christian Ponder"), 4))
          expect_warning(sensitivity_plot(SAVF_matrix, c(0.096, 
              0.224, 0.092, 0.138, 0.15, 0.22, 0.05), names, 4))
          expect_warning(sensitivity_plot(SAVF_matrix, c(0.096, 
              0.224, 0.092, 0.155, 0.175, 0.228, 0.15), names, 
              4))
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              "4"))
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              9))
      })
  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, criteria, title = TRUE) 
  {
      Names <- dplyr::quo(Names)
      Weight <- dplyr::quo(Weight)
      Value <- dplyr::quo(Value)
      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")
      }
      if ((class(criteria) != "numeric") | (criteria > nrow(SAVF_matrix))) {
          stop("criteria must be a column number of the SAVF_Matrix")
      }
      SAVF_matrix[is.na(SAVF_matrix)] <- 0
      i <- criteria
      x <- seq(0, 1, by = 0.1)
      m <- matrix(NA, nrow = length(weights), ncol = 11)
      m <- sapply(1:length(weights), function(j) m[j, ] <- (1 - 
          x) * (weights[j]/(1 - weights[i])))
      m <- t(m)
      m[i, ] <- x
      M <- data.frame(MAVF_Scores(SAVF_matrix, m, names))
      names(M) <- c("Names", x)
      `%>%` <- dplyr::`%>%`
      M %>% tidyr::gather(Weight, Value, -c(1)) %>% ggplot2::ggplot(ggplot2::aes(x = as.numeric(Weight), 
          y = Value, group = Names, colour = Names)) + ggplot2::geom_line() + 
          ggplot2::geom_vline(xintercept = weights[i]) + ggplot2::ylab("MAVF Score") + 
          ggplot2::xlab("Weight") + if (title == TRUE) {
          ggplot2::labs(title = colnames(SAVF_matrix)[criteria])
      }
  }
  <bytecode: 0x5624a66cde08>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function sensitivity_plot in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  sensitivity_plot(SAVF_matrix, weights = SAVF_matrix, names, 4)
   --- 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: sensitivity_plot(SAVF_matrix, weights = SAVF_matrix, names, 4)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(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_sensitivity_plot.R#22: expect_error(sensitivity_plot(SAVF_matrix, weights = SAVF_matrix, 
      names, 4))
  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_sensitivity_plot.R#18: test_that("sensitivity_plot provides proper messages and warnings", 
      {
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              4))
          SAVF_matrix <- as.matrix(SAVF_matrix)
          expect_error(sensitivity_plot(SAVF_matrix, weights2, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix, weights = SAVF_matrix, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix[, 1:6], weights, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix, weights, c("Greg McElroy", 
              "Blaine Gabbert", "Christian Ponder"), 4))
          expect_warning(sensitivity_plot(SAVF_matrix, c(0.096, 
              0.224, 0.092, 0.138, 0.15, 0.22, 0.05), names, 4))
          expect_warning(sensitivity_plot(SAVF_matrix, c(0.096, 
              0.224, 0.092, 0.155, 0.175, 0.228, 0.15), names, 
              4))
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              "4"))
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              9))
      })
  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, criteria, title = TRUE) 
  {
      Names <- dplyr::quo(Names)
      Weight <- dplyr::quo(Weight)
      Value <- dplyr::quo(Value)
      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")
      }
      if ((class(criteria) != "numeric") | (criteria > nrow(SAVF_matrix))) {
          stop("criteria must be a column number of the SAVF_Matrix")
      }
      SAVF_matrix[is.na(SAVF_matrix)] <- 0
      i <- criteria
      x <- seq(0, 1, by = 0.1)
      m <- matrix(NA, nrow = length(weights), ncol = 11)
      m <- sapply(1:length(weights), function(j) m[j, ] <- (1 - 
          x) * (weights[j]/(1 - weights[i])))
      m <- t(m)
      m[i, ] <- x
      M <- data.frame(MAVF_Scores(SAVF_matrix, m, names))
      names(M) <- c("Names", x)
      `%>%` <- dplyr::`%>%`
      M %>% tidyr::gather(Weight, Value, -c(1)) %>% ggplot2::ggplot(ggplot2::aes(x = as.numeric(Weight), 
          y = Value, group = Names, colour = Names)) + ggplot2::geom_line() + 
          ggplot2::geom_vline(xintercept = weights[i]) + ggplot2::ylab("MAVF Score") + 
          ggplot2::xlab("Weight") + if (title == TRUE) {
          ggplot2::labs(title = colnames(SAVF_matrix)[criteria])
      }
  }
  <bytecode: 0x5624a66cde08>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function sensitivity_plot in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  sensitivity_plot(SAVF_matrix[, 1:6], weights, names, 4)
   --- 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: sensitivity_plot(SAVF_matrix[, 1:6], weights, names, 4)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(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_sensitivity_plot.R#23: expect_error(sensitivity_plot(SAVF_matrix[, 1:6], weights, names, 
      4))
  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_sensitivity_plot.R#18: test_that("sensitivity_plot provides proper messages and warnings", 
      {
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              4))
          SAVF_matrix <- as.matrix(SAVF_matrix)
          expect_error(sensitivity_plot(SAVF_matrix, weights2, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix, weights = SAVF_matrix, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix[, 1:6], weights, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix, weights, c("Greg McElroy", 
              "Blaine Gabbert", "Christian Ponder"), 4))
          expect_warning(sensitivity_plot(SAVF_matrix, c(0.096, 
              0.224, 0.092, 0.138, 0.15, 0.22, 0.05), names, 4))
          expect_warning(sensitivity_plot(SAVF_matrix, c(0.096, 
              0.224, 0.092, 0.155, 0.175, 0.228, 0.15), names, 
              4))
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              "4"))
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              9))
      })
  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, criteria, title = TRUE) 
  {
      Names <- dplyr::quo(Names)
      Weight <- dplyr::quo(Weight)
      Value <- dplyr::quo(Value)
      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")
      }
      if ((class(criteria) != "numeric") | (criteria > nrow(SAVF_matrix))) {
          stop("criteria must be a column number of the SAVF_Matrix")
      }
      SAVF_matrix[is.na(SAVF_matrix)] <- 0
      i <- criteria
      x <- seq(0, 1, by = 0.1)
      m <- matrix(NA, nrow = length(weights), ncol = 11)
      m <- sapply(1:length(weights), function(j) m[j, ] <- (1 - 
          x) * (weights[j]/(1 - weights[i])))
      m <- t(m)
      m[i, ] <- x
      M <- data.frame(MAVF_Scores(SAVF_matrix, m, names))
      names(M) <- c("Names", x)
      `%>%` <- dplyr::`%>%`
      M %>% tidyr::gather(Weight, Value, -c(1)) %>% ggplot2::ggplot(ggplot2::aes(x = as.numeric(Weight), 
          y = Value, group = Names, colour = Names)) + ggplot2::geom_line() + 
          ggplot2::geom_vline(xintercept = weights[i]) + ggplot2::ylab("MAVF Score") + 
          ggplot2::xlab("Weight") + if (title == TRUE) {
          ggplot2::labs(title = colnames(SAVF_matrix)[criteria])
      }
  }
  <bytecode: 0x5624a66cde08>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function sensitivity_plot in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  sensitivity_plot(SAVF_matrix, weights, c("Greg McElroy", "Blaine Gabbert", 
      "Christian Ponder"), 4)
   --- 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: sensitivity_plot(SAVF_matrix, weights, c("Greg McElroy", "Blaine Gabbert", 
      "Christian Ponder"), 4)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(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_sensitivity_plot.R#24: expect_error(sensitivity_plot(SAVF_matrix, weights, c("Greg McElroy", 
      "Blaine Gabbert", "Christian Ponder"), 4))
  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_sensitivity_plot.R#18: test_that("sensitivity_plot provides proper messages and warnings", 
      {
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              4))
          SAVF_matrix <- as.matrix(SAVF_matrix)
          expect_error(sensitivity_plot(SAVF_matrix, weights2, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix, weights = SAVF_matrix, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix[, 1:6], weights, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix, weights, c("Greg McElroy", 
              "Blaine Gabbert", "Christian Ponder"), 4))
          expect_warning(sensitivity_plot(SAVF_matrix, c(0.096, 
              0.224, 0.092, 0.138, 0.15, 0.22, 0.05), names, 4))
          expect_warning(sensitivity_plot(SAVF_matrix, c(0.096, 
              0.224, 0.092, 0.155, 0.175, 0.228, 0.15), names, 
              4))
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              "4"))
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              9))
      })
  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, criteria, title = TRUE) 
  {
      Names <- dplyr::quo(Names)
      Weight <- dplyr::quo(Weight)
      Value <- dplyr::quo(Value)
      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")
      }
      if ((class(criteria) != "numeric") | (criteria > nrow(SAVF_matrix))) {
          stop("criteria must be a column number of the SAVF_Matrix")
      }
      SAVF_matrix[is.na(SAVF_matrix)] <- 0
      i <- criteria
      x <- seq(0, 1, by = 0.1)
      m <- matrix(NA, nrow = length(weights), ncol = 11)
      m <- sapply(1:length(weights), function(j) m[j, ] <- (1 - 
          x) * (weights[j]/(1 - weights[i])))
      m <- t(m)
      m[i, ] <- x
      M <- data.frame(MAVF_Scores(SAVF_matrix, m, names))
      names(M) <- c("Names", x)
      `%>%` <- dplyr::`%>%`
      M %>% tidyr::gather(Weight, Value, -c(1)) %>% ggplot2::ggplot(ggplot2::aes(x = as.numeric(Weight), 
          y = Value, group = Names, colour = Names)) + ggplot2::geom_line() + 
          ggplot2::geom_vline(xintercept = weights[i]) + ggplot2::ylab("MAVF Score") + 
          ggplot2::xlab("Weight") + if (title == TRUE) {
          ggplot2::labs(title = colnames(SAVF_matrix)[criteria])
      }
  }
  <bytecode: 0x5624a66cde08>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function sensitivity_plot in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  DecisionAnalysis
   --- call from context --- 
  sensitivity_plot(SAVF_matrix, c(0.096, 0.224, 0.092, 0.138, 0.15, 
      0.22, 0.05), names, 4)
   --- 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: sensitivity_plot(SAVF_matrix, c(0.096, 0.224, 0.092, 0.138, 0.15, 
      0.22, 0.05), names, 4)
  where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 3: withCallingHandlers(code, warning = function(condition) {
      out$push(condition)
      maybe_restart("muffleWarning")
  })
  where 4: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 5: quasi_capture(enquo(object), label, capture_warnings)
  where 6 at testthat/test_sensitivity_plot.R#25: expect_warning(sensitivity_plot(SAVF_matrix, c(0.096, 0.224, 
      0.092, 0.138, 0.15, 0.22, 0.05), names, 4))
  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_sensitivity_plot.R#18: test_that("sensitivity_plot provides proper messages and warnings", 
      {
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              4))
          SAVF_matrix <- as.matrix(SAVF_matrix)
          expect_error(sensitivity_plot(SAVF_matrix, weights2, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix, weights = SAVF_matrix, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix[, 1:6], weights, 
              names, 4))
          expect_error(sensitivity_plot(SAVF_matrix, weights, c("Greg McElroy", 
              "Blaine Gabbert", "Christian Ponder"), 4))
          expect_warning(sensitivity_plot(SAVF_matrix, c(0.096, 
              0.224, 0.092, 0.138, 0.15, 0.22, 0.05), names, 4))
          expect_warning(sensitivity_plot(SAVF_matrix, c(0.096, 
              0.224, 0.092, 0.155, 0.175, 0.228, 0.15), names, 
              4))
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              "4"))
          expect_error(sensitivity_plot(SAVF_matrix, weights, names, 
              9))
      })
  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, criteria, title = TRUE) 
  {
      Names <- dplyr::quo(Names)
      Weight <- dplyr::quo(Weight)
      Value <- dplyr::quo(Value)
      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")
      }
      if ((class(criteria) != "numeric") | (criteria > nrow(SAVF_matrix))) {
          stop("criteria must be a column number of the SAVF_Matrix")
      }
      SAVF_matrix[is.na(SAVF_matrix)] <- 0
      i <- criteria
      x <- seq(0, 1, by = 0.1)
      m <- matrix(NA, nrow = length(weights), ncol = 11)
      m <- sapply(1:length(weights), function(j) m[j, ] <- (1 - 
          x) * (weights[j]/(1 - weights[i])))
      m <- t(m)
      m[i, ] <- x
      M <- data.frame(MAVF_Scores(SAVF_matrix, m, names))
      names(M) <- c("Names", x)
      `%>%` <- dplyr::`%>%`
      M %>% tidyr::gather(Weight, Value, -c(1)) %>% ggplot2::ggplot(ggplot2::aes(x = as.numeric(Weight), 
          y = Value, group = Names, colour = Names)) + ggplot2::geom_line() + 
          ggplot2::geom_vline(xintercept = weights[i]) + ggplot2::ylab("MAVF Score") + 
          ggplot2::xlab("Weight") + if (title == TRUE) {
          ggplot2::labs(title = colnames(SAVF_matrix)[criteria])
      }
  }
  <bytecode: 0x5624a66cde08>
  <environment: namespace:DecisionAnalysis>
   --- function search by body ---
  Function sensitivity_plot in namespace DecisionAnalysis has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 5. Error: sensitivity_plot provides proper messages and warnings (@test_sensi
  the condition has length > 1
  Backtrace:
   1. testthat::expect_warning(...)
   6. DecisionAnalysis::sensitivity_plot(...)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 63 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 5 ]
  1. Error: MAVF_breakout provides proper messages and warnings (@test_MAVF_breakout.R#25) 
  2. Error: MAVF_scores provides proper messages and warnings (@test_MAVF_scores.R#25) 
  3. Error: MAVF_scores has correct dimensions and output type (@test_MAVF_scores.R#33) 
  4. Error: MAVF_Scores computes correctly (@test_MAVF_scores.R#50) 
  5. Error: sensitivity_plot provides proper messages and warnings (@test_sensitivity_plot.R#25) 
  
  Error: testthat unit tests failed
  Execution halted