Learn R Programming

LogicForest (version 2.1.3)

p.combos: Generate All Combinations of N Variables with a Specified Conjunction Value

Description

Creates a matrix representing all possible combinations of n.pair variables. Each row corresponds to a unique combination, and each column represents a variable where 1 indicates inclusion and conj indicates exclusion.

Usage

p.combos(n.pair, conj = 0)

Value

A matrix with 2^n.pair rows and n.pair columns, where each row is a unique combination of 1s and conj values.

Arguments

n.pair

Integer. Number of predictors in the combination.

conj

Numeric. Value denoting absence of a variable in a combination (default is 0).

Author

Bethany Wolf wolfb@musc.edu

Details

This is an internal function called by prime.imp and is not intended for independent use.