% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/S3_matvec.R
\name{sweep}
\alias{sweep}
\title{Sweep out array summaries (generic)}
\usage{
sweep(x, MARGIN, STATS, FUN = "-", check.margin = TRUE, ...)
}
\arguments{
\item{x}{A matrix or \code{HDF5Matrix} object.}

\item{MARGIN}{Integer. \code{1} for rows, \code{2} for columns.}

\item{STATS}{Numeric vector to sweep out.}

\item{FUN}{Character. Function to apply: \code{"-"}, \code{"+"}, etc.}

\item{check.margin}{Logical. Check that \code{STATS} length matches margin.}

\item{...}{Additional arguments passed to the method.}
}
\value{
A new \code{HDF5Matrix} or matrix with \code{STATS} swept out.
}
\description{
S3 generic for \code{sweep()}. Dispatches to \code{\link{sweep.HDF5Matrix}}
for \code{HDF5Matrix} objects, and to \code{base::sweep()} for all others.
}
