create_tidyamplicons | R Documentation |
tidyamplicons
returns a tidyamplicons object given a numeric matrix.
create_tidyamplicons(abundance_matrix, taxa_are_columns = TRUE)
abundance_matrix |
Numerical matrix containing the abundance data. |
taxa_are_columns |
A logical scalar. Are the taxa defined in columns? |
This function initiates a tidyamplicons object based on a numeric matrix. It
will automatically create a dummy taxa and sample table which will need to be
updated using the functions add_taxon_tibble
and
add_sample_tibble
.
# Initiate abundance matrix
x <- matrix(
c(1500, 1300, 280, 356),
ncol = 2
)
rownames(x) <- c("taxon1", "taxon2")
colnames(x) <- c("sample1", "sample2")
# Convert to tidyamplicons object
data <- create_tidyamplicons(x,
taxa_are_columns = FALSE)
## Not run:
tidyamplicons("a")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.