as_rbiom | R Documentation |
Construct an rbiom object. The returned object is an R6 reference class.
Use b <- a$clone()
to create copies, not b <- a
.
as_rbiom(biom, ...)
biom |
Object which can be coerced to an rbiom-class object. For example:
|
... |
Properties to overwrite in biom: |
An rbiom object.
library(rbiom)
# create a simple matrix ------------------------
mtx <- matrix(
data = floor(runif(24) * 1000),
nrow = 6,
dimnames = list(paste0("OTU", 1:6), paste0("Sample", 1:4)) )
mtx
# and some sample metadata ----------------------
df <- data.frame(
.sample = paste0("Sample", 1:4),
treatment = c("A", "B", "A", "B"),
days = c(12, 3, 7, 8) )
# convert data set to rbiom ---------------------
biom <- as_rbiom(mtx, metadata = df, id = "My BIOM")
biom
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.