% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/amp_rarecurve.R
\name{amp_rarecurve}
\alias{amp_rarecurve}
\alias{amp_rarefaction_curve}
\title{Rarefaction curve}
\usage{
amp_rarecurve(
  data,
  stepsize = 1000,
  color_by = NULL,
  facet_by = NULL,
  facet_scales = "fixed"
)

amp_rarefaction_curve(
  data,
  stepsize = 1000,
  color_by = NULL,
  facet_by = NULL,
  facet_scales = "fixed"
)
}
\arguments{
\item{data}{(\emph{required}) Data list as loaded with \code{\link{amp_load}}.}

\item{stepsize}{Step size for the curves. Lower is prettier but takes more time to generate. (\emph{default:} \code{1000})}

\item{color_by}{Color curves by a variable in the metadata. (\emph{default:} \code{NULL})}

\item{facet_by}{Split the plot into subplots based on a variable in the metadata. (\emph{default:} \code{NULL})}

\item{facet_scales}{If \code{facet_by} is set, should the axis scales of each subplot be fixed (\code{fixed}), free (\code{"free"}), or free in one dimension (\code{"free_x"} or \code{"free_y"})? (\emph{default:} \code{"fixed"})}
}
\value{
A ggplot2 object.
}
\description{
Generates a rarefaction curve (number of reads vs number of observed OTUs) for each sample.
}
\examples{
# Load example data
data("AalborgWWTPs")

# Rarecurve
amp_rarecurve(AalborgWWTPs, facet_by = "Plant")
}
\seealso{
\code{\link{amp_load}}, \code{\link{amp_octave}}
}
\author{
Kasper Skytte Andersen \email{ksa@bio.aau.dk}

Mads Albertsen \email{MadsAlbertsen85@gmail.com}
}
