% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adjustData.R
\name{findDuplicates}
\alias{findDuplicates}
\title{Find and Remove Duplicate Features}
\usage{
findDuplicates(data, missing, counts, duplicate)
}
\arguments{
\item{data}{Constructed metabolomics data frame.}

\item{missing}{Numeric vector. Percent missingness for each feature.}

\item{counts}{Numeric vector. Central measure for each feature.}

\item{duplicate}{Ordered numeric pair (m/z, rt) tolerance parameters for
duplicate feature search.}
}
\value{
integer indices of removable duplicate features
}
\description{
Pairs of features with nearly identical m/z and retention time values are
removed in this step.
}
\details{
Pairs of features are deemed duplicates if pairwise differences in m/z & rt
fall within tolerances defined by the \code{duplicate} argument. If a pair
of duplicate features is found, one member is removed. The determination of
which feature to remove is first by percent missingness, followed by central
abundance measure (median or mean). If the features have equal missingness
and abundance, then row order determines the feature to be removed.
}
