set.seed(42)
df <- data.frame(
height = rnorm(15, 170, 10),
weight = rnorm(15, 70, 12),
group = factor(rep(LETTERS[1:3], each = 5)),
score = ordered(sample(c("low","med","high"), 15, TRUE))
)
## keep every subset whose internal associations <= 0.6
assocSelect(df, threshold = 0.6)
## use Kendall for all rank-based comparisons and force 'height' to appear
assocSelect(df,
threshold = 0.5,
method_num_num = "kendall",
method_num_ord = "kendall",
method_ord_ord = "kendall",
force_in = "height")
Run the code above in your browser using DataLab