rarefy_sample_count_by_modality {MiscMetabar} | R Documentation |
Rarefy (equalize) the number of samples per modality of a factor
Description
Usage
rarefy_sample_count_by_modality(physeq, fact, rngseed = FALSE, verbose = TRUE)
Arguments
physeq |
(required): a |
fact |
(required): The variable to rarefy. Must be present in
the |
rngseed |
(Optional). A single integer value passed to set.seed, which is used to fix a seed for reproducibly random number generation (in this case, reproducibly random subsampling). If set to FALSE, then no iddling with the RNG seed is performed, and it is up to the user to appropriately call |
verbose |
(logical). If TRUE, print additional informations. |
Value
A new phyloseq-class
object.
Author(s)
Adrien Taudière
See Also
Examples
table(data_fungi_mini@sam_data$Height)
data_fungi_mini2 <- rarefy_sample_count_by_modality(data_fungi_mini, "Height")
table(data_fungi_mini2@sam_data$Height)
if (requireNamespace("patchwork")) {
ggvenn_pq(data_fungi_mini, "Height") + ggvenn_pq(data_fungi_mini2, "Height")
}
[Package MiscMetabar version 0.9.1 Index]