Learn R Programming

sensors4plumes (version 0.9.3)

spatialSpreadFunctions: Cost functions dependent only on sensor locations

Description

Kriging variance computes the ordinary kriging variance at a given set of points for the case of certain sensor locations and variogram model.

minimalDistance computes for each given point the distance to the next sensor.

Both functions can be used as input to spatialSpread that runs them and turns the result into global cost.

Usage

krigingVariance(allLocations, locations, model)
  minimalDistance(allLocations, locations, algorithm = "kd_tree")

Arguments

allLocations

SpatialDataFrame (not "SpatialIndexDataFrame"), for each of the locations a cost is computed

locations

indices of sensors in allLocations

model

model to be forwarded to krige

algorithm

character to be forwarded as algorithm to get.knnx

Value

A vector of length allLocations with cost for these locations.

Examples

Run this code
# NOT RUN {
# see spatialSpread
# }

Run the code above in your browser using DataLab