R/UDStack.R

setGeneric("UDStack", function(x, ...) {
  standardGeneric("UDStack")
})
setMethod("UDStack",
  signature = "RasterStack",
  definition = function(x, method = "unknown", ...) {
    new(".UDStack", x, method = method)
  }
)
setMethod("UDStack",
  signature = "RasterBrick",
  definition = function(x, method, ...) {
    callGeneric(stack(x), ...)
  }
)
setMethod("UDStack",
  signature = "list",
  definition = function(x, method, ...) {
    callGeneric(stack(x), ...)
  }
)
setMethod("UDStack",
  signature = ".UDBurstStack",
  definition = function(x, method = "unknown", ...) {
    callGeneric(x / cellStats(x, sum), ...)
  }
)

Try the move package in your browser

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

move documentation built on July 9, 2023, 6:09 p.m.