Description Usage Arguments Details Value Author(s)
View source: R/randomize_by_rows.R
This function randomizes a binary matrix by shuffling the values in rows using sampling probabilities specified in vector w. It is similar to Sim4 but has the advantage that the user may specify w instead of having it calculated from the column sums.
1 | randomize_by_rows(com, w, rename=FALSE)
|
com |
A binary community matrix with samples as rows and taxaa as columns. |
w |
Sampling weights in a vector of length equal to row length in com. |
rename |
A logical indicating whether or not samples should be renamed. |
The number of non-zero entries in w must be at least the maximum number of non-zero entries in a row of com (max(rowSums(com)).
A randomized binary matrix.
John Quensen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.