Skip to content

Commit

Permalink
drop=FALSE
Browse files Browse the repository at this point in the history
  • Loading branch information
yjunechoe committed Feb 1, 2024
1 parent 00be505 commit f2c8284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/permute_timewise_statistics.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ permute_timewise_statistics <- function(jlmer_spec, family = c("gaussian", "bino
check_convergence_failures <- function(z_array) {
convergence_failures_pos <- is.nan(z_array)
if (any(convergence_failures_pos)) {
convergence_failures <- unique(which(convergence_failures_pos, arr.ind = TRUE)[, c("Predictor", "Sim")])
convergence_failures <- unique(which(convergence_failures_pos, arr.ind = TRUE)[, c("Predictor", "Sim"), drop = FALSE])
convergence_failure_table <- table(convergence_failures[, "Predictor"])
names(convergence_failure_table) <- dimnames(z_array)$Predictor[as.integer(names(convergence_failure_table))]
cli::cli_alert_info("Convergence errors encountered (out of {.arg nsim = {.val {nrow(z_array)}}}) while bootstrapping the following {cli::qty(names(convergence_failure_table))}predictor{?s}:")
Expand Down

0 comments on commit f2c8284

Please sign in to comment.