Skip to contents

Create kde density version of a raster

Usage

smooth_raster(
  x,
  bw = raster::res(x),
  smooth_fact = 5,
  keep_resolution = TRUE,
  na.rm = TRUE,
  pad = TRUE,
  padValue = NA,
  threshold = NULL,
  type = c("Gauss", "circle", "rectangle"),
  ...
)

Arguments

x

raster object

bw

bandwidth

smooth_fact

integer, disaggregate factor to have a better smoothing

keep_resolution

integer, should the returned map have same resolution as x or keep the disaggregated raster resulting from smooth_fact?

na.rm

should the NA value be removed from the raster?

pad

should the data be padded?

padValue

what should the padding value be?

threshold

cells with a lower (weighted) value of this threshold will be removed.

type

what is the type of smoothing (see raster::focal())

...

passed through to focal.