randomize_by_rows: Randomize by Rows

Description Usage Arguments Details Value Author(s)

View source: R/randomize_by_rows.R

Description

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.

Usage

1

Arguments

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.

Details

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)).

Value

A randomized binary matrix.

Author(s)

John Quensen


jfq3/QsNullModels documentation built on April 6, 2020, 2:06 p.m.