Skip to content

Commit 937652c

Browse files
committed
msg
1 parent f2d92c1 commit 937652c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

R/check_model.R

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,18 @@ check_model.default <- function(
305305
}
306306

307307
# set default for show_dots, based on "model size"
308+
n <- .safe(insight::n_obs(x))
308309
if (is.null(show_dots)) {
309-
n <- .safe(insight::n_obs(x))
310310
show_dots <- is.null(n) || n <= 1e5
311311
}
312312

313+
# tell user about limited dots
314+
if (!is.null(maximum_dots) && !is.null(n) && n > maximum_dots && verbose) {
315+
insight::format_alert(
316+
"The model contains a large number of observations. To ensure efficient rendering, the plot is limited to 2,000 data points. You can use the `maximum_dots` argument to adjust this limit."
317+
)
318+
}
319+
313320
attr(assumptions_data, "panel") <- panel
314321
attr(assumptions_data, "dot_size") <- size_dot
315322
attr(assumptions_data, "line_size") <- size_line

0 commit comments

Comments
 (0)