Skip to content

Commit 0ac9733

Browse files
committed
another bug fix for interactions
1 parent 1b7d437 commit 0ac9733

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/encoding.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ getFactorLevels <- function(data, pars) {
8585
# Separate out interactions
8686
ints <- grepl("\\*", pars)
8787
if (any(ints)) {
88-
pars <- pars[ints == FALSE]
88+
pars_int <- pars[ints == TRUE]
89+
pars_int <- unlist(lapply(pars_int, function(x) strsplit(x, "\\*")))
90+
pars <- unique(c(pars[ints == FALSE], pars_int))
8991
}
9092
factorLevels <- NULL
9193
parTypes <- getParTypes(data, pars)

0 commit comments

Comments
 (0)