Running ‘testthat.R’ [2s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(seminr)
  > Sys.unsetenv("R_TESTS")
  > test_check("seminr")
  Generating the seminr model
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  seminr
   --- call from context --- 
  mmMatrix_per_construct(construct, mmMatrix)
   --- call from argument --- 
  if (class(constructmatrix) == "character") {
      constructmatrix = t(as.matrix(constructmatrix))
  }
   --- R stacktrace ---
  where 1: mmMatrix_per_construct(construct, mmMatrix)
  where 2: nrow(mmMatrix_per_construct(construct, mmMatrix))
  where 3: warning_single_item_formative(mmMatrix)
  where 4: warnings(measurement_model, data, structural_model)
  where 5 at testthat/test-bootstrap.R#23: estimate_pls(mobi, mobi_mm, mobi_sm, inner_weights = path_factorial)
  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(NULL, exprs, env)
  where 17: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 18: force(code)
  where 19: doWithOneRestart(return(expr), restart)
  where 20: withOneRestart(expr, restarts[[1L]])
  where 21: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 22: 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 23: FUN(X[[i]], ...)
  where 24: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 25: force(code)
  where 26: doWithOneRestart(return(expr), restart)
  where 27: withOneRestart(expr, restarts[[1L]])
  where 28: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 29: 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 30: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 31: 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 32: 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 33: test_check("seminr")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (construct, mmMatrix) 
  {
      constructmatrix <- mmMatrix[mmMatrix[, "construct"] == construct, 
          c("construct", "measurement", "type")]
      if (class(constructmatrix) == "character") {
          constructmatrix = t(as.matrix(constructmatrix))
      }
      return(constructmatrix)
  }
  <bytecode: 0x5592df144a40>
  <environment: namespace:seminr>
   --- function search by body ---
  Function mmMatrix_per_construct in namespace seminr has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1