# NOT RUN {
tb <- mtcars
tb$cyl <- as.factor(tb$cyl)
tb$vs <- as.factor(tb$vs)
out <- association(tb, categorical = c("cyl", "vs"))
# To use the methodMats parameter, create a matrix like this
methodMats <- out$method_used
# the values can be changed as per requirement
# NOTE: in addition to the values from parameters method1 and method3,
# the values in methodMats can also be the values returned by
# association function. But its advisable to use the options from
# method1 and method3 arguements
methodMats["mpg", "disp"] <- methodMats["disp", "mpg"] <- "spearman"
out <- association(tb, categorical = c("cyl", "vs"), methodMats = methodMats)
rm(tb)
# }
Run the code above in your browser using DataLab