Running ‘testthat.R’ [29s/95s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(seminr)
  > Sys.unsetenv("R_TESTS")
  > test_check("seminr")
  [ FAIL 34 | WARN 17 | SKIP 3 | PASS 127 ]
  
  ══ Skipped tests (3) ═══════════════════════════════════════════════════════════
  • empty test (3): 'test-plot-cbsem.R:1:1', 'test-plot-lavaan-cfa.R:1:1',
    'test-plot-save-plot.R:1:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-bootstrap.R:41:1'): (code run outside of `test_that()`) ────────
  <subscriptOutOfBoundsError/error/condition>
  Error in `bootmatrix[start:end, 1:nboot]`: subscript out of bounds
  Backtrace:
      ▆
   1. └─seminr::bootstrap_model(...) at test-bootstrap.R:41:1
   2.   └─base::tryCatch(...)
   3.     └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   4.       ├─base (local) tryCatchOne(...)
   5.       │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   6.       └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
   7.         └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   8.           └─value[[3L]](cond)
  ── Failure ('test-bootstrap.R:56:3'): Seminr performs the bootstrapping correctly ──
  bootmatrix[, 1] not equal to bootmatrix_control[, 1].
  target is NULL, current is numeric
  ── Failure ('test-bootstrap.R:57:3'): Seminr performs the bootstrapping correctly ──
  bootmatrix[, 2] not equal to bootmatrix_control[, 2].
  target is NULL, current is numeric
  ── Failure ('test-bootstrap.R:58:3'): Seminr performs the bootstrapping correctly ──
  bootmatrix[, 3] not equal to bootmatrix_control[, 3].
  target is NULL, current is numeric
  ── Error ('test-bootstrap.R:83:1'): (code run outside of `test_that()`) ────────
  <subscriptOutOfBoundsError/error/condition>
  Error in `bootmatrix[start:end, 1:nboot]`: subscript out of bounds
  Backtrace:
      ▆
   1. └─seminr::bootstrap_model(...) at test-bootstrap.R:83:1
   2.   └─base::tryCatch(...)
   3.     └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   4.       ├─base (local) tryCatchOne(...)
   5.       │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   6.       └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
   7.         └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   8.           └─value[[3L]](cond)
  ── Failure ('test-bootstrap.R:98:3'): Seminr performs the bootstrapping correctly ──
  bootmatrix[, 1] not equal to bootmatrix_control[, 1].
  target is NULL, current is numeric
  ── Failure ('test-bootstrap.R:99:3'): Seminr performs the bootstrapping correctly ──
  bootmatrix[, 2] not equal to bootmatrix_control[, 2].
  target is NULL, current is numeric
  ── Failure ('test-bootstrap.R:100:3'): Seminr performs the bootstrapping correctly ──
  bootmatrix[, 3] not equal to bootmatrix_control[, 3].
  target is NULL, current is numeric
  ── Error ('test-bootstrap.R:123:1'): (code run outside of `test_that()`) ───────
  <subscriptOutOfBoundsError/error/condition>
  Error in `bootmatrix[start:end, 1:nboot]`: subscript out of bounds
  Backtrace:
      ▆
   1. └─seminr::bootstrap_model(...) at test-bootstrap.R:123:1
   2.   └─base::tryCatch(...)
   3.     └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   4.       ├─base (local) tryCatchOne(...)
   5.       │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   6.       └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
   7.         └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   8.           └─value[[3L]](cond)
  ── Failure ('test-bootstrap.R:137:3'): Seminr performs the bootstrapping correctly ──
  bootmatrix[, 1] not equal to bootmatrix_control[, 1].
  target is NULL, current is numeric
  ── Failure ('test-bootstrap.R:138:3'): Seminr performs the bootstrapping correctly ──
  bootmatrix[, 2] not equal to bootmatrix_control[, 2].
  target is NULL, current is numeric
  ── Failure ('test-bootstrap.R:139:3'): Seminr performs the bootstrapping correctly ──
  bootmatrix[, 3] not equal to bootmatrix_control[, 3].
  target is NULL, current is numeric
  ── Error ('test-bootstrap.R:161:1'): (code run outside of `test_that()`) ───────
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(mobi, mobi_mm, mobi_sm, inner_weights = path_weighting) at test-bootstrap.R:161:1
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-consistent-interactions.R:24:1'): (code run outside of `test_that()`) ──
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(...) at test-consistent-interactions.R:24:1
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-consistent.R:21:1'): (code run outside of `test_that()`) ───────
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(mobi, mobi_mm, mobi_sm, inner_weights = path_factorial) at test-consistent.R:21:1
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-descriptive-stats.R:20:1'): (code run outside of `test_that()`) ──
  Error in ``diag<-`(`*tmp*`, value = sqrt(rhoC_AVE_pls_model(seminr_model, 
      model_constructs$construct_names)[, "AVE"]))`: replacement diagonal has wrong length
  Backtrace:
      ▆
   1. ├─base::summary(seminr_model) at test-descriptive-stats.R:20:1
   2. └─seminr:::summary.seminr_model(seminr_model)
   3.   └─seminr:::evaluate_model(object)
   4.     └─seminr:::validity(seminr_model)
   5.       └─seminr:::fl_criteria_table(seminr_model, model_constructs)
   6.         └─base::`diag<-`(...)
  ── Error ('test-measure.r:67:1'): (code run outside of `test_that()`) ──────────
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(data = mobi, measurement_model = mm, structural_model = sm) at test-measure.r:67:1
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-only-sm-composites-evaluated.R:30:1'): (code run outside of `test_that()`) ──
  Error in ``diag<-`(`*tmp*`, value = sqrt(rhoC_AVE_pls_model(seminr_model, 
      model_constructs$construct_names)[, "AVE"]))`: replacement diagonal has wrong length
  Backtrace:
      ▆
   1. ├─base::summary(happy_pls_lower) at test-only-sm-composites-evaluated.R:30:1
   2. └─seminr:::summary.seminr_model(happy_pls_lower)
   3.   └─seminr:::evaluate_model(object)
   4.     └─seminr:::validity(seminr_model)
   5.       └─seminr:::fl_criteria_table(seminr_model, model_constructs)
   6.         └─base::`diag<-`(...)
  ── Error ('test-plot-basics.R:27:4'): dot_graph does not fail for a demo data set ──
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(...) at test-plot-basics.R:27:4
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-plot-basics.R:65:3'): dot_graph can handle both composite measurement types ──
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(...) at test-plot-basics.R:65:3
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-plot-bootstrapped.R:20:3'): bootstrapped models work ───────────
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(...) at test-plot-bootstrapped.R:20:3
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-plot-htmt.R:26:3'): Basic HTMT Plots work ──────────────────────
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(...) at test-plot-htmt.R:26:3
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-plot-interaction.R:20:3'): interaction terms work ──────────────
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(...) at test-plot-interaction.R:20:3
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-plot-shape-offsets.R:20:3'): Testing different shapes for different constructs ──
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(...) at test-plot-shape-offsets.R:20:3
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-plot-specifiedmodel.R:29:3'): dot_graph does not fail for a specified model ──
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(data = mobi, model = model) at test-plot-specifiedmodel.R:29:3
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-plot-themes.R:31:3'): Modify theme edge multipliers ────────────
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(...) at test-plot-themes.R:31:3
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-pls-mga.R:36:3'): Seminr estimates the correct PLS-MGA p-values ──
  <subscriptOutOfBoundsError/error/condition>
  Error in `bootmatrix[start:end, 1:nboot]`: subscript out of bounds
  Backtrace:
      ▆
   1. └─seminr::estimate_pls_mga(mobi_pls, rand_cond, nboot = 100, cores = 2) at test-pls-mga.R:36:3
   2.   └─seminr::bootstrap_model(...)
   3.     └─base::tryCatch(...)
   4.       └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   5.         ├─base (local) tryCatchOne(...)
   6.         │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   7.         └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
   8.           └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9.             └─value[[3L]](cond)
  ── Error ('test-pls-mga.R:36:3'): Seminr estimates the correct PLS-MGA p-values ──
  <subscriptOutOfBoundsError/error/condition>
  Error in `bootmatrix[start:end, 1:nboot]`: subscript out of bounds
  Backtrace:
      ▆
   1. └─seminr::estimate_pls_mga(mobi_pls, rand_cond, nboot = 100, cores = 2) at test-pls-mga.R:36:3
   2.   └─seminr::bootstrap_model(...)
   3.     └─base::tryCatch(...)
   4.       └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   5.         ├─base (local) tryCatchOne(...)
   6.         │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   7.         └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
   8.           └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9.             └─value[[3L]](cond)
  ── Error ('test-pls-mga.R:36:3'): Seminr estimates the correct PLS-MGA p-values ──
  Error in `1:pls_boot$boots`: argument of length 0
  Backtrace:
      ▆
   1. └─seminr::estimate_pls_mga(mobi_pls, rand_cond, nboot = 100, cores = 2) at test-pls-mga.R:36:3
   2.   └─seminr::boot_paths_df(group1_boot)
   3.     └─base::apply(...)
   4.       └─seminr (local) FUN(newX[, i], ...)
  ── Error ('test-plsc-fsquared.R:38:1'): (code run outside of `test_that()`) ────
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. └─seminr::estimate_pls(...) at test-plsc-fsquared.R:38:1
   2.   └─seminr:::model_consistent(seminr_model)
   3.     └─seminr::PLSc(seminr_model)
  ── Error ('test-rerun.R:38:3'): rerun of pls_model with changed specification creates different results ──
  Error in `stats::cor(seminr_model$construct_scores)/adjustment`: non-conformable arrays
  Backtrace:
      ▆
   1. ├─seminr::rerun(mobi_pls, measurement_model = as.reflective(mobi_mm)) at test-rerun.R:38:3
   2. └─seminr:::rerun.pls_model(mobi_pls, measurement_model = as.reflective(mobi_mm))
   3.   └─seminr::estimate_pls(...)
   4.     └─seminr:::model_consistent(seminr_model)
   5.       └─seminr::PLSc(seminr_model)
  ── Error ('test-structure.r:98:1'): (code run outside of `test_that()`) ────────
  Error in ``diag<-`(`*tmp*`, value = sqrt(rhoC_AVE_pls_model(seminr_model, 
      model_constructs$construct_names)[, "AVE"]))`: replacement diagonal has wrong length
  Backtrace:
      ▆
   1. ├─base::summary(seminr_model1) at test-structure.r:98:1
   2. └─seminr:::summary.seminr_model(seminr_model1)
   3.   └─seminr:::evaluate_model(object)
   4.     └─seminr:::validity(seminr_model)
   5.       └─seminr:::fl_criteria_table(seminr_model, model_constructs)
   6.         └─base::`diag<-`(...)
  ── Error ('test-summary.R:20:1'): (code run outside of `test_that()`) ──────────
  Error in ``diag<-`(`*tmp*`, value = sqrt(rhoC_AVE_pls_model(seminr_model, 
      model_constructs$construct_names)[, "AVE"]))`: replacement diagonal has wrong length
  Backtrace:
      ▆
   1. ├─base::summary(seminr_model) at test-summary.R:20:1
   2. └─seminr:::summary.seminr_model(seminr_model)
   3.   └─seminr:::evaluate_model(object)
   4.     └─seminr:::validity(seminr_model)
   5.       └─seminr:::fl_criteria_table(seminr_model, model_constructs)
   6.         └─base::`diag<-`(...)
  ── Error ('test-validity.R:30:1'): (code run outside of `test_that()`) ─────────
  Error in ``diag<-`(`*tmp*`, value = sqrt(rhoC_AVE_pls_model(seminr_model, 
      model_constructs$construct_names)[, "AVE"]))`: replacement diagonal has wrong length
  Backtrace:
      ▆
   1. ├─base::summary(model1) at test-validity.R:30:1
   2. └─seminr:::summary.seminr_model(model1)
   3.   └─seminr:::evaluate_model(object)
   4.     └─seminr:::validity(seminr_model)
   5.       └─seminr:::fl_criteria_table(seminr_model, model_constructs)
   6.         └─base::`diag<-`(...)
  
  [ FAIL 34 | WARN 17 | SKIP 3 | PASS 127 ]
  Error: Test failures
  Execution halted