factor.add.combinations: Adds combinations of factors to a data frame

Description Usage Arguments Value Examples

Description

Adds combinations of factors to a data frame

Usage

1
factor.add.combinations(data, vars.list, combinations)

Arguments

data

A data frame

vars.list

A list of pairs (variable.name,variable.type) such as those produced by allvariables.manual.review

list.combs

A list such as those created by factor.allpairs.test

Value

If vars.list is supplied, a list whose first element is an expanded version of data and whose second element is the corresponding expanded version of vars.list; if vars.list is missing, returns only the modified version of data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
list.pairs <- list(c("cyl","factor"),c("vs","factor"),c("am","factor"),
                   c("gear","factor"),c("carb","factor"))
list.combs  <- factor.allpairs.test(mtcars,pairs,"mpg")
view.allpairs.test.result(list.combs)
newdata <- factor.add.combinations(data = mtcars, list.combs = list.combs)
head(newdata)
list.combs2 <- select.combinations(list.combs, max.factors = 6, min.RI = 0.4)
newdata2 <- factor.add.combinations(data = mtcars, vars.list = list.pairs, list.combs = list.combs2)
head(newdata2[[1]])
tail(newdata2[[2]])

ahdxb/data.exploration documentation built on May 11, 2019, 11:31 p.m.