quantize | R Documentation |
This is a community null model method for quantitative community data (e.g. abundance or occurrence probability).
It is designed to adapt binary null model algorithms for use with quantitative data, which can be useful if
there is not a quantitative-specific algorithm available that has the desired properties. For example, use with
the binary "curveball" algorithm preserves row and column totals, and also approximately preserves the marginal
distributions of rows and columns. For each randomization, the data set is split into strata representing numerical ranges
of the input quantities, a separate binary randomization is done for each stratum, and the results are
combined to produce a randomized, quantitative community matrix. See vegan::commsim()
for details about
other binary and quantitative null models.
quantize(x, method = "curveball", ...)
x |
Community matrix with species in rows, sites in columns, and nonnegative quantities in cells. |
method |
Null model algorithm, passed to |
... |
Additional arguments, including:
|
A randomized version of x
.
# example quantitative community matrix
comm <- ps_get_comm(moss("polygon"), tips_only = TRUE, spatial = FALSE)[1:50, 1:50]
# examples of different quantize usage
rand <- quantize(comm)
rand <- quantize(comm, n_strata = 4, transform = sqrt, priority = "rows")
rand <- quantize(comm, method = "swap", burnin = 10)
# (note: this `burnin` value is far too small for a real analysis)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.