51 lines
1.3 KiB
R
51 lines
1.3 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/metabarcoding_threshold.R
|
|
\docType{methods}
|
|
\name{marginalsum,metabarcoding.data-method}
|
|
\alias{marginalsum,metabarcoding.data-method}
|
|
\alias{marginalsum-methods,metabarcoding.data}
|
|
\title{Computes marginal sums over read counts.}
|
|
\usage{
|
|
\S4method{marginalsum}{metabarcoding.data}(data, MARGIN = "sample",
|
|
na.rm = FALSE)
|
|
}
|
|
\arguments{
|
|
\item{data}{The \code{\linkS4class{metabarcoding.data}} instance
|
|
on which marginal sums have to be computed.}
|
|
|
|
\item{MARGIN}{Indicates if the sums have to be computed across
|
|
samples or motus.
|
|
Allowed values are :
|
|
\itemize{
|
|
\item{'sample' or 1} for computing sum across samples
|
|
\item{'motu' or 2} for computing sum across motus
|
|
}}
|
|
|
|
\item{na.rm}{Logical. Should missing values be omitted from the
|
|
calculations?}
|
|
}
|
|
\value{
|
|
Returns the vector of marginal sums as a \code{numeric} vector
|
|
}
|
|
\description{
|
|
Method \code{marginalsum} computes marginal sums over read counts of
|
|
a \code{\link{metabarcoding.data}} instance.
|
|
}
|
|
\examples{
|
|
# load termite data set from the ROBITools sample data
|
|
data(termes)
|
|
|
|
# Computes marginal sums per sample
|
|
ssum = marginalsum(termes,MARGIN="sample")
|
|
|
|
# Computes marginal sums per MOTU
|
|
msum = marginalsum(termes,MARGIN="motu")
|
|
|
|
}
|
|
\seealso{
|
|
\code{\linkS4class{metabarcoding.data}}
|
|
}
|
|
\author{
|
|
Aurelie Bonin
|
|
}
|