Skip to content

Commit

Permalink
tidy for 0.6-6 CRAN submission
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Jul 14, 2024
1 parent 464e224 commit f722fff
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/aggregate.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @param left.open logical; used for time intervals, see \link{findInterval} and \link{cut.POSIXt}
#' @param as_points see \link[stars]{st_as_sf}: shall raster pixels be taken as points, or small square polygons?
#' @param exact logical; if \code{TRUE}, use \link[exactextractr]{coverage_fraction} to compute exact overlap fractions of polygons with raster cells
#' @seealso \link[sf]{aggregate}, \link{st_interpolate_aw}, \link{st_extract}, https://github.com/r-spatial/stars/issues/317
#' @seealso \link[sf]{aggregate}, \link[sf]{st_interpolate_aw}, \link{st_extract}, https://github.com/r-spatial/stars/issues/317
#' @export
#' @aliases aggregate
#' @examples
Expand Down
6 changes: 5 additions & 1 deletion R/init.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ setOldClass("stars_proxy")

.onLoad = function(libname, pkgname) {
register_all_s3_methods() # dynamically registers non-imported pkgs (tidyverse) # nocov
}

.onAttach = function(libname, pkgname) {
if (nrow(sf::st_drivers("raster", "netCDF")) != 1)
message("Note: sf is linked to a GDAL version without netCDF driver, some tests or examples may fail")
packageStartupMessage("Note: sf is linked to a GDAL version without netCDF driver, some tests or examples may fail")
}

2 changes: 1 addition & 1 deletion R/subset.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ st_intersects.bbox = function(x, y, ...) { # FIXME: segmentize first if geograph
#' @param as_points logical; only relevant if \code{y} is of class \code{sf} or \code{sfc}: if \code{FALSE}, treat \code{x} as a set of points, else as a set of small polygons. Default: \code{TRUE} if \code{y} is two-dimensional, else \code{FALSE}; see Details
#' @param ... ignored
#' @param crop logical; if \code{TRUE}, the spatial extent of the returned object is cropped to still cover \code{obj}, if \code{FALSE}, the extent remains the same but cells outside \code{y} are given \code{NA} values.
#' @param normalize logical; if \code{TRUE} then pass the cropped object to \code{\link{st_normalize}} before returning.
#' @param normalize logical; if \code{TRUE} then pass the cropped object to \code{\link[sf]{st_normalize}} before returning.
#' @details for raster \code{x}, \code{st_crop} selects cells that intersect with \code{y}.
#' For intersection, are raster cells interpreted as points or as small polygons?
#' If \code{y} is of class \code{stars}, \code{x} raster cells are interpreted as points; if \code{y} is of class \code{bbox}, \code{x} cells are interpreted as cells (small polygons). Otherwise, if \code{as_points} is not given, cells are interpreted as points if \code{y} has a two-dimensional geometry.
Expand Down
2 changes: 1 addition & 1 deletion man/aggregate.stars.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/st_crop.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f722fff

Please sign in to comment.