ipdwInterp: Inverse Distance Weighting with custom distances

Description Usage Arguments Value Author(s) Examples

Description

This function takes a rasterstack of pathdistances and generates surfaces by weighting parameter values by these distances

Usage

1
2
ipdwInterp(spdf, rstack, paramlist, overlapped = FALSE, yearmon = "default",
  removefile = TRUE)

Arguments

spdf

SpatialPointsDataFrame object

rstack

RasterStack of path distances

paramlist

character. String representing parameter names

overlapped

logical. Default is FALSE, specify TRUE if some points lie on top of barriers

yearmon

character. String specifying the name of the spdf

removefile

logical. Remove files after processing?

Value

RasterLayer

Author(s)

Joseph Stachelek

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
spdf <- data.frame(rnorm(2))
xy <- data.frame(x = c(4, 2), y = c(8, 4))
coordinates(spdf) <- xy
m <- matrix(NA, 10, 10)
costras <- raster(m, xmn = 0, xmx = ncol(m), ymn = 0, ymx = nrow(m))
#introduce spatial gradient
costras[] <- runif(ncell(costras), min = 1, max = 10)
for(i in 1:nrow(costras)){
 costras[i,] <- costras[i,] + i
 costras[,i] <- costras[,i] + i
}

rstack <- pathdistGen(spdf, costras, 100)
final.raster <- ipdwInterp(spdf, rstack, paramlist = c("rnorm.2."), overlapped = TRUE)
plot(final.raster)

ipdw documentation built on May 23, 2017, 9:05 a.m.

Search within the ipdw package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.