Skip to content

constrainedKriging

0.2-11Package record

Constrained, Covariance-Matching Constrained and Universal Point or Block Kriging

1packages depend
5.3Kdownloads / year
–test coverage
11/13flavors OK

Overview

About

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

CRAN checks
2ERROR11OK
Check messages
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)

CRAN check page ↗

Slowest check: 2.8 min · r-devel-windows-x86_64
Status changes
  • ERROR11 OK, 2 ERRORNow
  • ERROR12 OK, 2 ERROR2026-03-10
Advisories

none known

Documentation

In release 0.2-11
READMENoVignettesNoNEWSNoCitation fileYes · cites a publicationWebsitenot declared in DESCRIPTION
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

5.3K
CRAN downloads in the past year
Rank #6,437 · ~14/day · ~438/mo
Daily download trend is not available in this view yet.
58830 days
1.3K90 days
5.3K1 year
Compare downloads with other packages →
Also on397 r2u13 autocran62 c2d4u

Dependencies

Declared dependencies
5 external dependencies (excludes base and recommended)

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.

Depends (2)
R >= 2.9sp
Imports (7)
graphicsgrDevicesmethodsparallelsfspatialCovariancestats
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Depends, Imports or LinkingTo, most downloaded first

Datasets

People & History

People (2)
Contributor, Maintainer since 0.2-7 (2023) · added in 0.2-7

Previously maintained by Christoph Hofer (0.1.0 to 0.2.4).

Releases (19)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 0.2-11Latest
    record
    2025-02-04 · current release · diff ↗
  • 0.2-10
    record
    2025-02-01 · diff ↗
  • 0.2-9
    record
    2025-01-07 · diff ↗
  • 0.2-8
    record
    2024-08-24 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • unarchivedReturned to CRAN
    2023-12-19
  • 0.2-7
    record
    2023-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.preCKrigePolygons
    added 2 exports
    preCKrigePoints, preCKrigePolygons
  • R
    R 4.3.0 released · 2023-04-21
  • archivedRemoved from CRAN
    2022-05-04
    requires archived package 'RandomFields'
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
Show 24 earlier eventsHide 24 earlier events

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
Appears in task views

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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for constrainedKriging version 0.2-11 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy