% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/exact_resample.R
\name{exact_resample}
\alias{exact_resample}
\alias{exact_resample,RasterLayer,RasterLayer-method}
\alias{exact_resample,SpatRaster,SpatRaster-method}
\title{Resample a raster to a new grid}
\usage{
\S4method{exact_resample}{RasterLayer,RasterLayer}(x, y, fun, coverage_area = FALSE)

\S4method{exact_resample}{SpatRaster,SpatRaster}(x, y, fun, coverage_area = FALSE)
}
\arguments{
\item{x}{a \code{RasterLayer} or \code{SpatRaster} to be resampled}

\item{y}{a raster of the same class as \code{x} with a grid definition to
which \code{x} should be resampled}

\item{fun}{a named summary operation or R function to be used for the resampling}

\item{coverage_area}{use cell coverage areas instead of coverage fractions
in \code{fun}}
}
\value{
a resampled version of \code{x}, returned as a \code{RasterLayer} or
        \code{SpatRaster}, depending on the values of \code{x} and \code{y}
}
\description{
Resample a raster to a new grid
}
