Skip to content

Commit

Permalink
bug!: fix conditional logic check for testing threshold meet N #130
Browse files Browse the repository at this point in the history
---

failed to be triggered as result needed to evaluate to TRUE for required expression to evaluate
  • Loading branch information
egouldo committed Aug 29, 2024
1 parent 2f67e3d commit 571f09f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/fit_uni_mixed_effects.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ fit_uni_mixed_effects <- function(data, N = 5) {

return(NA)

} else if(data %>% count(mixed_model) %>% pointblank::test_col_vals_gte(columns = n, value = N)) {
} else if (!pointblank::test_col_vals_gte(data,
columns = n,
value = N,
preconditions = \(x) count(x, mixed_model))) {

cli::cli_warn(message = "Less than {.arg N} = {.val {N}} observations in ",
"each level of {.var mixed_model}. Returning {.val {NA}}.")
Expand Down

0 comments on commit 571f09f

Please sign in to comment.