Learn R Programming

QCA (version 0.2-1)

createMatrix: Create a base matrix for the truth table

Description

The truth table consists from all combinations of presence/absence of conditions, and this (AFAIK) is the fastest way to create a matrix with these combinations, using ideas inspired from expand.grid

Usage

createMatrix(no.conditions)

Arguments

no.conditions
the number of conditions from the dataset

References

Ragin, Charles C. 1987 The Comparative Method. Moving beyond qualitative and quantitative strategies, Berkeley: University of California Press

See Also

'truthTable'

Examples

Run this code
# create a matrix based on 3 conditions
createMatrix(3)

# the matrix has 2^3 = 8 rows

Run the code above in your browser using DataLab