Skip to content

Commit df586c0

Browse files
committed
removed redundant input to dummy coding function
1 parent dd27359 commit df586c0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

R/modelInputs.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ getModelInputs <- function(data, choiceName, obsIDName, parNames, randPars,
1414
catVars <- getCatVars(data, parNames)
1515
if (!is.null(catVars)) {
1616
data <- dummyCode(data, catVars)
17-
parNames <- getDummyCodedParNames(data, parNames)
17+
parNames <- getDummyCodedParNames(data, parNames, catVars)
1818
}
1919
# Set up the parameters
2020
parSetup <- getParSetup(parNames, priceName, randPars, randPrice)
@@ -119,9 +119,8 @@ dummyCode = function(df, vars) {
119119
return(df)
120120
}
121121

122-
getDummyCodedParNames <- function(df, parNames) {
122+
getDummyCodedParNames <- function(df, parNames, catVars) {
123123
# Create a new set of parNames with the dummy-coded names
124-
catVars <- getCatVars(df, parNames)
125124
nonCatVars <- setdiff(parNames, catVars)
126125
allVars <- names(df)
127126
keepDummyVars <- c()

0 commit comments

Comments
 (0)