R/mean.R

Defines functions sum.sdc_raster mean.sdc_raster

#' @export
mean.sdc_raster <- function(x, ...){
  r <- x$value
  r$sum/r$count
}

#' @export
sum.sdc_raster <- function(..., na.rm = TRUE){
  x <- list(...)[[1]]
  x$value$sum
}

Try the sdcSpatial package in your browser

Any scripts or data that you put into this service are public.

sdcSpatial documentation built on March 24, 2022, 5:05 p.m.