Skip to content

Commit 192c0a6

Browse files
committed
copilot was right
1 parent 6dc729b commit 192c0a6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

R/extract_parameters.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@
782782
exception_type <- ifelse(
783783
is.null(standardize),
784784
"for multivariate models",
785-
"when standardizing",
785+
"when standardizing"
786786
)
787787
insight::format_error(
788788
sprintf("`test = \"all\"` is not supported %s;", exception_type),
@@ -1106,6 +1106,9 @@
11061106
# For models where the response is NOT standardized, the (Intercept) is set
11071107
# to NA and so we also need to set all inferential statistics to NA
11081108
coef_name <- colnames(pr)[startsWith(colnames(pr), "Std_")]
1109+
if (length(coef_name) != 1L) {
1110+
insight::format_error("Wrong number of standardized coefficient columns detected.")
1111+
}
11091112
rows_to_NA <- pr$Parameter == "(Intercept)" | is.na(pr[[coef_name]])
11101113
if (any(rows_to_NA)) {
11111114
# fmt: skip

0 commit comments

Comments
 (0)