Constrained, Covariance-Matching Constrained and Universal Point or Block Kriging
Overview
Provides functions for efficient computation of non-linear spatial predictions with local change of support (Hofer, C. and Papritz, A. (2011) "constrainedKriging: An R-package for customary, constrained and covariance-matching constrained point or block kriging" doi:10.1016/j.cageo.2011.02.009). This package supplies functions for two-dimensional spatial interpolation by constrained (Cressie, N. (1993) "Aggregation in geostatistical problems" doi:10.1007/978-94-011-1739-5_3), covariance-matching constrained (Aldworth, J. and Cressie, N. (2003) "Prediction of nonlinear spatial functionals" doi:10.1016/S0378-3758(02)00321-X) and universal (external drift) Kriging for points or blocks of any shape from data with a non-stationary mean function and an isotropic weakly stationary covariance function. The linear spatial interpolation methods, constrained and covariance-matching constrained Kriging, provide approximately unbiased prediction for non-linear target values under change of support. This package extends the range of tools for spatial predictions available in R and provides an alternative to conditional simulation for non-linear spatial prediction problems with local change of support.
Install
Health
ERRORexamplesr-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
r-devel-linux-x86_64-fedora-clang
Running examples in ‘constrainedKriging-Ex.R’ failed
The error most likely occurred in:
> ### Name: CKrige
> ### Title: Constrained, Covariance-matching Constrained and Universal
> ### Kriging
> ### Aliases: CKrige CKrige.points CKrige.polygons CKrige-methods
> ### CKrige,formula,data.frame,formula,preCKrigePoints-method
> ### CKrige,formula,data.frame,formula,preCKrigePolygons-method
> ### print.CKrige.exout.polygons summary.CKrige.exout.polygons
> ### print.CKrige.exout.points summary.CKrige.exout.points
> ### Keywords: methods
>
> ### ** Examples
>
>
>
>
> ### example 7: universal block Kriging of mean over whole domain
> ### cf chapter 4 of vignette of package georob
> ### (https://CRAN.R-project.org/package=georob)
> if(!requireNamespace("gstat", quietly = TRUE)){
+ stop("install package gstat to run example")
+ }
> ### load coalash data
> data(coalash, package="gstat")
>
> ### generate SpatialPointsDataFrame covering entire domain of coalash data
> coalash.domain <- rbind(c(0.5,0), c(16.5,0), c(16.5,24), c(0.5,24), c(0.5,0))
> coalash.domain <- SpatialPolygonsDataFrame(
+ SpatialPolygons(list(Polygons(list(Polygon(coalash.domain)), ID= "domain"))),
+ data=data.frame(x=8.5,y=12,row.names="domain"))
>
> ### universal block Kriging
> preCK_coalash <- preCKrige(newdata = coalash.domain, model = covmodel(modelname =
+ "exponential", mev = 1.023, nugget = 0, variance = 0.268,
+ scale = 1.907), pwidth = 16, pheight = 24)
> UK_coalash <- CKrige(formula = coalash ~ x, data = coalash,
+ locations = ~ x+y, object = preCK_coalash, method = 1)
OMP: Warning #96: Cannot form a team with 28 threads, using 2 instead.
OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).r-devel-linux-x86_64-fedora-gcc
Running examples in ‘constrainedKriging-Ex.R’ failed
The error most likely occurred in:
> ### Name: CKrige
> ### Title: Constrained, Covariance-matching Constrained and Universal
> ### Kriging
> ### Aliases: CKrige CKrige.points CKrige.polygons CKrige-methods
> ### CKrige,formula,data.frame,formula,preCKrigePoints-method
> ### CKrige,formula,data.frame,formula,preCKrigePolygons-method
> ### print.CKrige.exout.polygons summary.CKrige.exout.polygons
> ### print.CKrige.exout.points summary.CKrige.exout.points
> ### Keywords: methods
>
> ### ** Examples
>
>
>
>
> ### example 7: universal block Kriging of mean over whole domain
> ### cf chapter 4 of vignette of package georob
> ### (https://CRAN.R-project.org/package=georob)
> if(!requireNamespace("gstat", quietly = TRUE)){
+ stop("install package gstat to run example")
+ }
> ### load coalash data
> data(coalash, package="gstat")
>
> ### generate SpatialPointsDataFrame covering entire domain of coalash data
> coalash.domain <- rbind(c(0.5,0), c(16.5,0), c(16.5,24), c(0.5,24), c(0.5,0))
> coalash.domain <- SpatialPolygonsDataFrame(
+ SpatialPolygons(list(Polygons(list(Polygon(coalash.domain)), ID= "domain"))),
+ data=data.frame(x=8.5,y=12,row.names="domain"))
>
> ### universal block Kriging
> preCK_coalash <- preCKrige(newdata = coalash.domain, model = covmodel(modelname =
+ "exponential", mev = 1.023, nugget = 0, variance = 0.268,
+ scale = 1.907), pwidth = 16, pheight = 24)
> UK_coalash <- CKrige(formula = coalash ~ x, data = coalash,
+ locations = ~ x+y, object = preCK_coalash, method = 1)- ERROR11 OK, 2 ERRORNow
- ERROR12 OK, 2 ERROR2026-03-10
Documentation
- Help pages
- 10 (1 internal)includes a package overview page
- Examples that run
- 75%6 run in a plain check (1 of them under a condition) · 2 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 86%
- Documented parameters
- 91%
- Return-value docs
- 71%
- Help pages citing references
- 50%
Downloads
Dependencies
Installing constrainedKriging adds 11 packages (9 with compiled code, 21 MB of source tarballs). Heaviest: sf 9.3 MB, sp 4.3 MB, s2 2.8 MB.
Code & Tests
Datasets
People & History
Previously maintained by Christoph Hofer (0.1.0 to 0.2.4).
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 0.2-11Latest
- 0.2-102025-02-01 · diff ↗
- 0.2-92025-01-07 · diff ↗
- 0.2-82024-08-24 · diff ↗
- RR 4.4.0 released · 2024-04-24
- unarchivedReturned to CRAN2023-12-19
- 0.2-72023-12-19 · diff ↗ ·
removed 7 exports
summary.preCKrigePolygons, print.CKrige.exout.polygons, summary.CKrige.exout.polygons, print.CKrige.exout.points, summary.CKrige.exout.points, print.covmodel, plot.preCKrigePolygonsadded 2 exports
preCKrigePoints, preCKrigePolygons - RR 4.3.0 released · 2023-04-21
- archivedRemoved from CRAN2022-05-04requires archived package 'RandomFields'
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
Show 24 earlier eventsHide 24 earlier events
- RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- 0.2.42015-04-30 · diff ↗
- RR 3.2.0 released · 2015-04-16
- 0.2.32014-05-26 · diff ↗
- RR 3.1.0 released · 2014-04-10
- 0.2.22013-10-02 · diff ↗
- 0.2.12013-06-21 · diff ↗
- 0.2.02013-06-17 · diff ↗
- RR 3.0.0 released · 2013-04-03
- 0.1.9
- 0.1.82012-11-12 · diff ↗
- 0.1.72012-04-24 · diff ↗
- RR 2.15.0 released · 2012-03-30
- RR 2.14.0 released · 2011-10-31
- 0.1.62011-08-12 · diff ↗
- 0.1.52011-08-10 · diff ↗
- RR 2.13.0 released · 2011-04-13
- 0.1.42011-01-14 · diff ↗
- RR 2.12.0 released · 2010-10-15
- 0.1.22010-08-17 · diff ↗
- 0.1.12010-08-09 · diff ↗
- 0.1.02010-07-29
- RR 2.11.0 released · 2010-04-22
Package metadata
- First published
- 2010-07-29
- Total releases
- 19 / 16 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 2.9
- Bundled data
- 15 KB / 1 file
- Download size
- 79 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("constrainedKriging")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.