From 0ec47ca30facd1197542934ea88672668b352818 Mon Sep 17 00:00:00 2001 From: Scott Simpkins Date: Wed, 20 Mar 2024 11:11:15 -0700 Subject: [PATCH] Fix a bug when attempting to use multiple constraints --- R/gnm.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/gnm.R b/R/gnm.R index 7615b1b..e031eb7 100755 --- a/R/gnm.R +++ b/R/gnm.R @@ -163,7 +163,7 @@ gnm <- function(formula, eliminate = NULL, ofInterest = NULL, return.indices = TRUE)) if (is.character(constrain)) { res <- match(constrain, coefNames, 0) - if (res == 0 && length(constrain) == 1){ + if (identical(res, 0) && length(constrain) == 1){ constrain <- match(grep(constrain, coefNames), seq_len(nParam), 0) }