Learn R Programming

setweaver (version 1.0.0)

find_minimal_sets: find_minimal_sets

Description

Given a character vector of sets (each set encoded as variable names joined by a separator), returns the subset of sets that are minimal: no returned set is a strict superset of another. Duplicates and ordering differences are handled according to the implementation.

Usage

find_minimal_sets(str_vec, sep = "_")

Value

A character vector containing the minimally sufficient sets (i.e., sets that are not strict supersets of any other set in `str_vec`).

Arguments

str_vec

Character vector of set strings for which to find minimally sufficient sets (e.g., `c("x1_x2", "x1_x2_x3")`).

sep

Character string used as the separator between variables in each set. Defaults to `"_"`.

Examples

Run this code
pairmiresult = pairmi(misimdata[,2:6])
results_probstat <- probstat(misimdata$y,pairmiresult$expanded.data,nfolds=5)
find_minimal_sets(results_probstat$xvars[results_probstat$cprob >= 0.20])

Run the code above in your browser using DataLab