Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug when attempting to use multiple constraints #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix a bug when attempting to use multiple constraints
  • Loading branch information
RussianImperialScott committed Mar 20, 2024
commit 0ec47ca30facd1197542934ea88672668b352818
2 changes: 1 addition & 1 deletion R/gnm.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down