diff --git a/R/aggregate.R b/R/aggregate.R index 0185b7ec4..094d5702e 100644 --- a/R/aggregate.R +++ b/R/aggregate.R @@ -1,9 +1,9 @@ #' spatially or temporally aggregate stars object #' -#' spatially or temporally aggregate stars object, returning a data cube with lower spatial or temporal resolution +#' spatially or temporally aggregate stars object, returning a data cube with lower spatial or temporal resolution #' #' @param x object of class \code{stars} with information to be aggregated -#' @param by object of class \code{sf} or \code{sfc} for spatial aggregation, for temporal aggregation a vector with time values (\code{Date}, \code{POSIXct}, or \code{PCICt}) that is interpreted as a sequence of left-closed, right-open time intervals or a string like "months", "5 days" or the like (see \link{cut.POSIXt}); if by is an object of class \code{stars}, it is converted to sfc by \code{st_as_sfc(by, as_points = FALSE)} thus ignoring its time component. +#' @param by object of class \code{sf} or \code{sfc} for spatial aggregation, for temporal aggregation a vector with time values (\code{Date}, \code{POSIXct}, or \code{PCICt}) that is interpreted as a sequence of left-closed, right-open time intervals or a string like "months", "5 days" or the like (see \link{cut.POSIXt}); if by is an object of class \code{stars}, it is converted to sfc by \code{st_as_sfc(by, as_points = FALSE)} thus ignoring its time component. Note: each pixel is assigned to only a single group (in the order the groups occur) so non-overlapping spatial features and temporal windows are recommended. #' @param FUN aggregation function, such as \code{mean} #' @param ... arguments passed on to \code{FUN}, such as \code{na.rm=TRUE} #' @param drop logical; ignored