From 6ea29bb3c18a7790e90c06c165e4034fb954a904 Mon Sep 17 00:00:00 2001 From: philchalmers Date: Mon, 6 Jan 2025 13:09:38 -0500 Subject: [PATCH] more elagant break --- R/itemfit.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/itemfit.R b/R/itemfit.R index cfcdd213..4c2f010c 100644 --- a/R/itemfit.R +++ b/R/itemfit.R @@ -742,6 +742,9 @@ itemfit <- function(x, fit_stats = 'S_X2', }, par.strip.text=par.strip.text, par.settings=par.settings, ...)) } + if(nrow(empirical.plot_points) == 0) + stop(c('One or more groups have completely missing response data.\n', + 'Try taking manual group subsets via extract.group().'), call.=FALSE) while(nrow(empirical.plot_points) < nrow(empirical.plot_P)) empirical.plot_points <- rbind(empirical.plot_points, rep(NA, length(empirical.plot_points[1,])))