% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/uniquifyDataFrameByGroup.R
\name{uniquifyDataFrameByGroup}
\alias{uniquifyDataFrameByGroup}
\title{Groupwise unique rows of a DataFrame}
\usage{
uniquifyDataFrameByGroup(x, grouping)
}
\arguments{
\item{x}{A \linkS4class{DFrame}.}

\item{grouping}{A factor (or a vector coercible into a factor) of length equal to \code{nrow(x)},
containing the groupings for each row of \code{x}.}
}
\value{
A \linkS4class{DFrame} where each row corresponds to a level of \code{grouping}.
Each column corresponds to a column of \code{x} and contains the unique value for each group, or \code{NA} if no such value exists.
}
\description{
Obtain unique values for groups of rows in a \linkS4class{DataFrame}.
This is used by \code{\link{aggregateAcrossCells}} to obtain \code{\link{colData}} for the aggregated SummarizedExperiment.

This has been deprecated in favor of the \code{aggregateColData} function in the \pkg{scrapper} package.
}
\examples{
x <- DataFrame(
   foo = rep(LETTERS[1:3], 10),
   bar = rep(letters[1:3], 10),
   val = sample(3, 30, replace=TRUE)
)
uniquifyDataFrameByGroup(x, x$foo)
uniquifyDataFrameByGroup(x, x$val)

}
\author{
Aaron Lun
}
