Perms: Generate All Permutations of N Variables

View source: R/perms.R

PermsR Documentation

Generate All Permutations of N Variables

Description

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

Usage

Perms(n)

Arguments

n

Integer. Number of variables to generate permutations for.

Details

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

Value

A matrix with 2^n rows and n columns, where each row is a unique permutation of 0s and 1s.

Author(s)

Bethany Wolf wolfb@musc.edu


LogicForest documentation built on Feb. 14, 2026, 1:08 a.m.