% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{sumGroups}
\alias{sumGroups}
\alias{sumGroups.dgCMatrix}
\alias{sumGroups.matrix}
\title{sumGroups}
\usage{
sumGroups(X, y, MARGIN = 2)

\method{sumGroups}{dgCMatrix}(X, y, MARGIN = 2)

\method{sumGroups}{matrix}(X, y, MARGIN = 2)
}
\arguments{
\item{X}{matrix}

\item{y}{group labels}

\item{MARGIN}{whether observations are rows (=2) or columns (=1)}
}
\value{
Matrix of groups by features
}
\description{
Utility function to sum over group labels
}
