% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidy-methods.R
\name{as.data.frame.biom}
\alias{as.data.frame.biom}
\title{Coerce a biom object to a long-format tidy data frame}
\usage{
\method{as.data.frame}{biom}(x, ...)
}
\arguments{
\item{x}{A \code{\link{biom-class}} object.}

\item{...}{Ignored; present for S3 generic compatibility.}
}
\value{
A \code{\link{data.frame}} in long (tidy) format with at least
  three columns: \code{feature_id}, \code{sample_id}, \code{count}.
  Additional columns from \code{\link{sample_metadata}} and
  \code{\link{observation_metadata}} are appended when present.
}
\description{
Returns one row per (feature, sample) pair with columns
\code{feature_id}, \code{sample_id}, and \code{count} (or \code{value}
for character-type BIOM data), plus any sample and observation metadata
columns appended via a left-join.
}
\details{
Column name conflicts between the base triplet and joined metadata are
resolved automatically by \code{\link{merge}} using the suffixes
\code{""} and \code{"_sample"} (for sample metadata) or
\code{"_feature"} (for observation metadata).

The implementation is pure base R -- no tidyverse dependency.
For a tibble-wrapped version see \code{\link{as_tibble.biom}}.
}
\examples{
biom_file <- system.file("extdata", "rich_dense_otu_table.biom",
                         package = "biomformat")
x <- read_biom(biom_file)
df <- as.data.frame(x)
head(df)
dim(df)   # 30 rows (5 features x 6 samples), 14 columns
}
\seealso{
\code{\link{biom_data}}, \code{\link{as_tibble.biom}}
}
