vgmArea: point-point, point-area or area-area semivariance

Description Usage Arguments Value Author(s) Examples

View source: R/krige0.R

Description

Compute point-point, point-area or area-area variogram values from point model

Usage

1
vgmArea(x, y = x, vgm, ndiscr = 16, verbose = FALSE, covariance = TRUE)

Arguments

x

object of class SpatialPoints or SpatialPolygons

y

object of class SpatialPoints or SpatialPolygons

vgm

variogram model, see vgm

ndiscr

number of points to discretize an area, using spsample

verbose

give progress bar

covariance

logical; compute covariances, rather than semivariances?

Value

semivariance or covariance matrix of dimension length(x) x lenght(y)

Author(s)

Edzer Pebesma

Examples

1
2
3
4
library(sp)
demo(meuse, ask = FALSE, echo = FALSE)
vgmArea(meuse[1:5,], vgm = vgm(1, "Exp", 1000)) # point-point
vgmArea(meuse[1:5,], meuse.area, vgm = vgm(1, "Exp", 1000)) # point-area

Example output

          [,1]      [,2]      [,3]      [,4]      [,5]
[1,] 1.0000000 0.9316129 0.8879422 0.7716384 0.6932850
[2,] 0.9316129 1.0000000 0.8679977 0.7536317 0.6958367
[3,] 0.8879422 0.8679977 1.0000000 0.8666057 0.7780038
[4,] 0.7716384 0.7536317 0.8666057 1.0000000 0.8570468
[5,] 0.6932850 0.6958367 0.7780038 0.8570468 1.0000000
          [,1]
[1,] 0.1565761
[2,] 0.1646099
[3,] 0.1648786
[4,] 0.1672019
[5,] 0.1867704

gstat documentation built on March 19, 2021, 9:06 a.m.