% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DataManagement.R
\name{reduce}
\alias{reduce}
\title{Apply simple data reductions}
\usage{
reduce(object, covariates, groupBy, power = 1)
}
\arguments{
\item{object}{A Cyclops data object}

\item{covariates}{Integer or string vector: list of covariates to report}

\item{groupBy}{Integer or string (optional): generates a segmented reduction stratified by this covariate.  Setting \code{groupBy = "stratum"} segments reduction for strataID}

\item{power}{Integer: 0 = non-zero count, 1 = sum, 2 = sum-of-squares}
}
\value{
Specified reduction as number or \code{data.frame} if segmented.
}
\description{
\code{reduce} reports the count of non-zero elements, sum and sum-of-squares for specified covariates in a Cyclops data object.
}
\keyword{internal}
