curveball: Randomize a binary matrix using the curveball algorithm
Description
curveball randomizes a binary matrix, preserving the row and column sums
Usage
curveball(M)
Arguments
M
matrix: a binary matrix
Value
matrix: A random binary matrix with same row sums and column sums as M.
References
Strona, Giovanni, Domenico Nappo, Francesco Boccacci, Simone Fattorini, and Jesus San-Miguel-Ayanz. 2014. A Fast and Unbiased Procedure to Randomize Ecological Binary Matrices with Fixed Row and Column Totals. Nature Communications, 5, 4114. 10.1038/ncomms5114