Learn R Programming

incidentally (version 1.0.3)

space: Examine the space of incidence matrices with fixed marginals

Description

Examine the space of incidence matrices with fixed marginals

Usage

space(R, C)

Value

a list containing (a) a list of all matrices in the space and (b) a matrix of their perturbations

Arguments

R

vector of row sums

C

vector of column sums

Details

This implementation attempts to ennumerate all matrices in the space, but a complete ennumeration is not guaranteed. The cardinality of the space is often unknown and can be quite large. Therefore, exercise caution when examining the space of matrices larger than 5x5.

Examples

Run this code
space(R = c(2,1,1), C = c(1,1,2))

Run the code above in your browser using DataLab