# curveball: curveball algorithm In backbone: Extracts the Backbone from Weighted Graphs

## Description

curveball algorithm

## Usage

 `1` ```curveball(M) ```

## Arguments

 `M` matrix

## Value

rm, a matrix with same row sums and column sums as M, but randomized 0/1 entries.

## References

Algorithm and R implementation: 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 (June). Nature Publishing Group: 4114. doi: 10.1038/ncomms5114

## Examples

 `1` ```curveball(davis) ```

### Example output

```      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,]    0    1    1    0    0    1    0    1    1     1     1     1     0
[2,]    1    0    0    0    1    1    1    1    0     0     0     1     1
[3,]    0    0    1    1    1    0    1    1    1     1     0     1     0
[4,]    1    0    1    0    1    1    1    1    1     0     0     0     0
[5,]    0    1    0    0    0    1    0    1    0     0     0     1     0
[6,]    1    0    0    0    1    0    0    1    0     0     0     0     0
[7,]    0    0    0    0    0    0    1    1    1     0     0     0     0
[8,]    0    0    0    0    1    0    0    1    0     0     0     0     1
[9,]    0    0    0    0    1    1    1    0    0     0     1     0     0
[10,]    0    0    0    0    0    0    1    1    1     0     0     0     1
[11,]    0    0    1    0    0    0    0    1    1     0     1     0     0
[12,]    0    0    0    0    1    0    1    1    1     0     0     1     0
[13,]    0    1    1    1    0    0    0    1    1     1     0     1     0
[14,]    0    0    1    0    1    1    1    1    1     1     1     0     0
[15,]    0    0    0    1    0    1    1    1    0     1     0     0     0
[16,]    0    0    0    0    0    0    1    0    1     0     0     0     0
[17,]    0    0    0    1    0    0    0    0    1     0     0     0     0
[18,]    0    0    0    0    0    1    0    0    1     0     0     0     0
[,14]
[1,]     0
[2,]     0
[3,]     0
[4,]     0
[5,]     0
[6,]     1
[7,]     1
[8,]     0
[9,]     0
[10,]     0
[11,]     0
[12,]     1
[13,]     0
[14,]     0
[15,]     0
[16,]     0
[17,]     0
[18,]     0
```

backbone documentation built on Sept. 18, 2021, 1:07 a.m.