Package check result: NOTE Check: examples, Result: NOTE Examples with CPU (user + system) or elapsed time > 5s user system elapsed check_dag 7.391 0.215 7.149 Changes to worse in reverse depends: Package: JSmediation Check: examples New result: ERROR Running examples in ‘JSmediation-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: plot_assumptions > ### Title: Returns diagnostic plots for the linear model used in a > ### mediation > ### Aliases: plot_assumptions > > ### ** Examples > > ## Don't show: > if (rlang::is_installed("see")) (if (getRversion() >= "3.4") withAutoprint else force)({ # examplesIf + ## End(Don't show) + + data(ho_et_al) + + ho_et_al$condition_c <- build_contrast(ho_et_al$condition, + "Low discrimination", + "High discrimination") + + my_model <- + mdt_simple(data = ho_et_al, + IV = condition_c, + DV = hypodescent, + M = linkedfate) + + plot_assumptions(my_model) + ## Don't show: + }) # examplesIf > data(ho_et_al) > ho_et_al$condition_c <- build_contrast(ho_et_al$condition, "Low discrimination", + "High discrimination") > my_model <- mdt_simple(data = ho_et_al, IV = condition_c, DV = hypodescent, + M = linkedfate) > plot_assumptions(my_model) Error in `map2()`: ℹ In index: 1. ℹ With name: X -> Y. Caused by error in `strsplit()`: ! non-character argument Backtrace: ▆ 1. ├─(if (getRversion() >= "3.4") withAutoprint else force)(...) 2. │ └─base::source(...) 3. │ ├─base::withVisible(eval(ei, envir)) 4. │ └─base::eval(ei, envir) 5. │ └─base::eval(ei, envir) 6. ├─JSmediation::plot_assumptions(my_model) 7. ├─JSmediation:::plot_assumptions.mediation_model(my_model) 8. │ └─purrr::pluck(mediation_model, "js_models") %>% ... 9. ├─purrr::iwalk(...) 10. │ └─purrr::walk2(.x, vec_index(.x), .f, ...) 11. │ └─purrr::map2(.x, .y, .f, ..., .progress = .progress) 12. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress) 13. │ ├─purrr:::with_indexed_errors(...) 14. │ │ └─base::withCallingHandlers(...) 15. │ ├─purrr:::call_with_cleanup(...) 16. │ └─JSmediation (local) .f(.x[[i]], .y[[i]], ...) 17. │ ├─... %>% print() 18. │ └─JSmediation:::check_model_plot(model = .x, title = .y, tests_to_perform = tests_to_perform) 19. │ ├─see::plots(plot(assumption_plots), title = glue::glue("Model formula: {model_formula}")) 20. │ │ └─patchwork::wrap_plots(..., nrow = n_rows, ncol = n_columns, guides = guides) 21. │ │ └─patchwork:::is_valid_plot(..1) 22. │ │ └─ggplot2::is_ggplot(x) 23. │ │ └─S7::S7_inherits(x, class_ggplot) 24. │ ├─base::plot(assumption_plots) 25. │ ├─performance:::plot.check_model(assumption_plots) 26. │ ├─base::NextMethod() 27. │ └─see:::plot.see_check_model(assumption_plots) 28. │ ├─base::unlist(strsplit(attr(x, "theme"), "::", fixed = TRUE)) 29. │ └─base::strsplit(attr(x, "theme"), "::", fixed = TRUE) 30. ├─base::print(.) 31. └─base::.handleSimpleError(...) 32. └─purrr (local) h(simpleError(msg, call)) 33. └─cli::cli_abort(...) 34. └─rlang::abort(...) Execution halted Package: JSmediation Check: tests New result: ERROR Running ‘testthat.R’ [71s/55s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(JSmediation) > > test_check("JSmediation") Starting 2 test processes. > test-check_assumptions.R: X -> Y > test-check_assumptions.R: Warning: Non-normality of residuals detected (p < .001). > test-check_assumptions.R: OK: Error variance appears to be homoscedastic (p = 0.353). > test-check_assumptions.R: X -> M > test-check_assumptions.R: Warning: Non-normality of residuals detected (p < .001). > test-check_assumptions.R: Warning: Heteroscedasticity (non-constant error variance) detected (p = 0.004). > test-check_assumptions.R: X + M -> Y > test-check_assumptions.R: Warning: Non-normality of residuals detected (p < .001). > test-check_assumptions.R: Warning: Heteroscedasticity (non-constant error variance) detected (p < .001). > test-check_assumptions.R: X -> Y > test-check_assumptions.R: X -> M > test-check_assumptions.R: X + M -> Y > test-check_assumptions.R: X -> Y > test-check_assumptions.R: Warning: Non-normality of residuals detected (p < .001). > test-check_assumptions.R: X -> M > test-check_assumptions.R: Warning: Non-normality of residuals detected (p < .001). > test-check_assumptions.R: X + M -> Y > test-check_assumptions.R: Warning: Non-normality of residuals detected (p < .001). > test-mdt_moderated.R: Test of mediation (moderated mediation) > test-mdt_moderated.R: ============================================== > test-mdt_moderated.R: > test-mdt_moderated.R: Variables: > test-mdt_moderated.R: > test-mdt_moderated.R: - IV: condition_c > test-mdt_moderated.R: - DV: hypodescent > test-mdt_moderated.R: - M: linkedfate_c > test-mdt_moderated.R: - Mod: sdo > test-mdt_moderated.R: > test-mdt_moderated.R: It appears that the following variables are not contrast-coded or centered, > test-mdt_moderated.R: please make sure it is intended as regression coefficients depends on the > test-mdt_moderated.R: variables' coding: > test-mdt_moderated.R: * sdo > test-mdt_moderated.R: Paths: > test-mdt_moderated.R: > test-mdt_moderated.R: > test-mdt_moderated.R: ======== ============== ===== ======================= > test-mdt_moderated.R: Path Point estimate SE APA > test-mdt_moderated.R: ======== ============== ===== ======================= > test-mdt_moderated.R: a -1.469 0.194 t(820) = 7.58, p < .001 > test-mdt_moderated.R: a * Mod 0.323 0.076 t(820) = 4.25, p < .001 > test-mdt_moderated.R: b 0.240 0.079 t(818) = 3.02, p = .003 > test-mdt_moderated.R: b * Mod -0.049 0.031 t(818) = 1.57, p = .117 > test-mdt_moderated.R: c -0.211 0.189 t(820) = 1.12, p = .265 > test-mdt_moderated.R: c * Mod 0.035 0.074 t(820) = 0.47, p = .640 > test-mdt_moderated.R: c' 0.061 0.201 t(818) = 0.30, p = .763 > test-mdt_moderated.R: c' * Mod -0.035 0.077 t(818) = 0.46, p = .645 > test-mdt_moderated.R: ======== ============== ===== ======================= > test-mdt_moderated.R: > test-mdt_moderated.R: Indirect effect index: > test-mdt_moderated.R: > test-mdt_moderated.R: Indirect effect index is not computed by default. > test-mdt_moderated.R: Please use add_index() to compute it. > test-mdt_moderated.R: > test-mdt_moderated.R: Fitted models: > test-mdt_moderated.R: > test-mdt_moderated.R: - X * Mod -> Y > test-mdt_moderated.R: - X * Mod -> M > test-mdt_moderated.R: - (X + M) * Mod -> Y > test-compute_indirect_effect_for.R: Running nonparametric bootstrap > test-compute_indirect_effect_for.R: Saving _problems/test-plot_assumptions-33.R [ FAIL 1 | WARN 0 | SKIP 0 | PASS 88 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-plot_assumptions.R:32:3'): check_assumptions_plot ────────────── Error in `map2(.x, .y, .f, ..., .progress = .progress)`: i In index: 1. i With name: X -> Y. Caused by error in `strsplit()`: ! non-character argument Backtrace: ▆ 1. ├─testthat::expect_warning(...) at test-plot_assumptions.R:32:3 2. │ └─testthat:::expect_condition_matching_(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. ├─JSmediation::plot_assumptions(...) 8. ├─JSmediation:::plot_assumptions.mediation_model(...) 9. │ └─purrr::pluck(mediation_model, "js_models") %>% ... 10. ├─purrr::iwalk(...) 11. │ └─purrr::walk2(.x, vec_index(.x), .f, ...) 12. │ └─purrr::map2(.x, .y, .f, ..., .progress = .progress) 13. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress) 14. │ ├─purrr:::with_indexed_errors(...) 15. │ │ └─base::withCallingHandlers(...) 16. │ ├─purrr:::call_with_cleanup(...) 17. │ └─JSmediation (local) .f(.x[[i]], .y[[i]], ...) 18. │ ├─... %>% print() 19. │ └─JSmediation:::check_model_plot(model = .x, title = .y, tests_to_perform = tests_to_perform) 20. │ ├─see::plots(plot(assumption_plots), title = glue::glue("Model formula: {model_formula}")) 21. │ │ └─patchwork::wrap_plots(..., nrow = n_rows, ncol = n_columns, guides = guides) 22. │ │ └─patchwork:::is_valid_plot(..1) 23. │ │ └─ggplot2::is_ggplot(x) 24. │ │ └─S7::S7_inherits(x, class_ggplot) 25. │ ├─base::plot(assumption_plots) 26. │ ├─performance:::plot.check_model(assumption_plots) 27. │ ├─base::NextMethod() 28. │ └─see:::plot.see_check_model(assumption_plots) 29. │ ├─base::unlist(strsplit(attr(x, "theme"), "::", fixed = TRUE)) 30. │ └─base::strsplit(attr(x, "theme"), "::", fixed = TRUE) 31. ├─base::print(.) 32. └─base::.handleSimpleError(...) 33. └─purrr (local) h(simpleError(msg, call)) 34. └─cli::cli_abort(...) 35. └─rlang::abort(...) [ FAIL 1 | WARN 0 | SKIP 0 | PASS 88 ] Error: ! Test failures. Execution halted Package: see Check: examples New result: ERROR Running examples in ‘see-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: plot.see_check_model > ### Title: Plot method for checking model assumptions > ### Aliases: plot.see_check_model > > ### ** Examples > > ## Don't show: > if (require("patchwork")) withAutoprint({ # examplesIf + ## End(Don't show) + library(performance) + + model <- lm(qsec ~ drat + wt, data = mtcars) + plot(check_model(model)) + ## Don't show: + }) # examplesIf Loading required package: patchwork > library(performance) > model <- lm(qsec ~ drat + wt, data = mtcars) > plot(check_model(model)) Error in strsplit(attr(x, "theme"), "::", fixed = TRUE) : non-character argument Calls: withAutoprint ... NextMethod -> plot.see_check_model -> unlist -> strsplit Execution halted Examples with CPU (user + system) or elapsed time > 5s user system elapsed plot.see_check_dag 5.972 0.072 5.696 add_plot_attributes 5.522 0.298 5.467