Skip to content

Commit

Permalink
Merge pull request #545 from ethanwhite/aggregate-docs
Browse files Browse the repository at this point in the history
Clarify how aggregate treats overlapping groups
  • Loading branch information
edzer authored Jun 14, 2022
2 parents 7588258 + e75efaa commit e9b394b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/aggregate.R
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit e9b394b

Please sign in to comment.