plot.preCKrigePolygons {constrainedKriging}R Documentation

Plotting a Polygon Neighbourhood Configuration

Description

Plotting method for objects of the class “preCKrige.polygons”. The plot shows the polygon neighbourhood configuration for one polygon (block) in a preCKrige.polygons object as well as its representation by the pixels.

Usage

## S3 method for class 'preCKrigePolygons'
plot(x, index, ...)

Arguments

x

an object of the class “preCKrigePolygons”. In general the output object of a preCKrige function call.

index

a numeric scalar with the index of the desired polygon (block) in the list of polygons x@polygons.

...

further plotting parameters.

Value

No return value, called for side effects.

Author(s)

Christoph Hofer, christoph.hofer@alumni.ethz.ch

References

Hofer, C. and Papritz, A. (2011). constrainedKriging: an R-package for customary, constrained and covariance-matching constrained point or block Kriging. Computers & Geosciences. 37, 1562–1569, doi:10.1016/j.cageo.2011.02.009.

See Also

preCKrige and preCKrigePolygons.

Examples


### load data
data(meuse, package = "sp")
data(meuse.blocks)

### plot blocks
plot(meuse.blocks)

### compute the approximated block variance of each block in
### meuse.blocks without the definition of neighbours blocks (default)
preCK_1  <- preCKrige(newdata = meuse.blocks,
    model = covmodel("exponential", 0.05, 0.15, scale = 192.5),
    pwidth = 75, pheight = 75)

### plot block approximation of block 59
plot(preCK_1, 59)


### define neighbours
if(!requireNamespace("spdep", quietly = TRUE)){
  stop("install package spdep to run example")
}
neighbours <- spdep::poly2nb(meuse.blocks)
class(neighbours)
### neighbours should be an object of the class "list"
class(neighbours) <- "list"
### compute the approximated block variance-covariance matrices of each block in
### meuse.blocks without the defined block neighbours
preCK_2 <- preCKrige(newdata = meuse.blocks, neighbours = neighbours,
    model = covmodel("exponential", 0.05, 0.15, scale = 192.5),
    pwidth = 75, pheight = 75)

### plot block approximation of block 59 and its
### block neighbours
plot(preCK_2, 59)



[Package constrainedKriging version 0.2-7 Index]