Skip to content

Fixed Rank Kriging

1packages depend
8.1Kdownloads / year
44.7%test coverage
8/13flavors OK

Overview

About

A tool for spatial/spatio-temporal modelling and prediction with large datasets. The approach models the field, and hence the covariance function, using a set of basis functions. This fixed-rank basis-function representation facilitates the modelling of big data, and the method naturally allows for non-stationary, anisotropic covariance functions. Discretisation of the spatial domain into so-called basic areal units (BAUs) facilitates the use of observations with varying support (i.e., both point-referenced and areal supports, potentially simultaneously), and prediction over arbitrary user-specified regions. `FRK` also supports inference over various manifolds, including the 2D plane and 3D sphere, and it provides helper functions to model, fit, predict, and plot with relative ease. Version 2.0.0 and above also supports the modelling of non-Gaussian data (e.g., Poisson, binomial, negative-binomial, gamma, and inverse-Gaussian) by employing a generalised linear mixed model (GLMM) framework. Zammit-Mangion and Cressie doi:10.18637/jss.v098.i04 describe `FRK` in a Gaussian setting, and detail its use of basis functions and BAUs, while Sainsbury-Dale, Zammit-Mangion, and Cressie doi:10.18637/jss.v108.i10 describe `FRK` in a non-Gaussian setting; two vignettes are available that summarise these papers and provide additional examples.

Install

Health

CRAN checks
2ERROR3NOTE8OK
Check messages
ERRORre-building of vignette outputsr-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

r-devel-linux-x86_64-fedora-clang

Error(s) in re-building vignettes:
--- re-building ‘FRK_intro.Rnw’ using knitr
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).
--- re-building ‘FRK_non-Gaussian.Rnw’ using knitr
--- finished re-building ‘FRK_non-Gaussian.Rnw’

SUMMARY: processing the following file failed:
  ‘FRK_intro.Rnw’

Error: Vignette re-building failed.
Execution halted

r-devel-linux-x86_64-fedora-gcc

Error(s) in re-building vignettes:
--- re-building ‘FRK_intro.Rnw’ using knitr
--- re-building ‘FRK_non-Gaussian.Rnw’ using knitr
--- finished re-building ‘FRK_non-Gaussian.Rnw’

SUMMARY: processing the following file failed:
  ‘FRK_intro.Rnw’

Error: Vignette re-building failed.
Execution halted
ERRORtestsr-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

r-devel-linux-x86_64-fedora-clang

Running ‘testthat.R’ [90m/53m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ops <- options("crayon.enabled" = FALSE)
  > library(testthat)
  > require("covr")
  Loading required package: covr
  > 
  > test_check("FRK")
  Loading required package: FRK
  
  Attaching package: 'FRK'
  
  The following object is masked from 'package:stats':
  
      simulate
  
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by default. However this is only the case when
        method = 'TMB'. When method = 'EM', simple kriging is done, irrespective of
        what the argument simple_kriging_fixed is set to.
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======================                                             
...[truncated]...
                                                                    
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  Averaging over polygons...
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by default. However this is only the case when
        method = 'TMB'. When method = 'EM', simple kriging is done, irrespective of
        what the argument simple_kriging_fixed is set to.
  
    |                                                                            
    |                                                                      |   0%

r-devel-linux-x86_64-fedora-gcc

Running ‘testthat.R’ [90m/48m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ops <- options("crayon.enabled" = FALSE)
  > library(testthat)
  > require("covr")
  Loading required package: covr
  > 
  > test_check("FRK")
  Loading required package: FRK
  
  Attaching package: 'FRK'
  
  The following object is masked from 'package:stats':
  
      simulate
  
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by default. However this is only the case when
        method = 'TMB'. When method = 'EM', simple kriging is done, irrespective of
        what the argument simple_kriging_fixed is set to.
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=======================                                             
...[truncated]...
                                                                    
    |=======================                                               |  33%
    |                                                                            
    |===============================================                       |  67%
    |                                                                            
    |======================================================================| 100%
  Maximum EM iterations reached
  Averaging over polygons...
  NOTE: In FRK >2.0 simple_kriging_fixed = FALSE by default, and hence
        universal kriging is done by default. However this is only the case when
        method = 'TMB'. When method = 'EM', simple kriging is done, irrespective of
        what the argument simple_kriging_fixed is set to.
  
    |                                                                            
    |                                                                      |   0%
NOTEdependencies in R coder-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64

r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Base package in Suggests/Enhances imported in NAMESPACE:
  ‘parallel’

r-devel-windows-x86_64

Base package in Suggests/Enhances imported in NAMESPACE:
  'parallel'

CRAN check page ↗

Slowest check: 185.6 min · r-devel-linux-x86_64-fedora-gcc
Status changes
  • ERROR8 OK, 3 NOTE, 2 ERRORNow
  • ERROR9 OK, 3 NOTE, 2 ERROR2026-03-10
Advisories

none known

Documentation

In release 2.3.2
README· In the repository, left out of the releaseVignettesYes · 2 · dynamicNEWSNoCitation fileYes · cites a publicationWebsiteYes · pkgdown
Cites a JSS article
Help pages
47
Examples that run
79%26 run in a plain check · 3 never run · 4 hold no code
Exported functions with examples
91%
Documented parameters
94%
Return-value docs
11%
Help pages citing references
17%

Also includes 2 demo scripts (run with demo())

Downloads

8.1K
CRAN downloads in the past year
Rank #4,387 · ~22/day · ~676/mo
Daily download trend is not available in this view yet.
78930 days
1.9K90 days
8.1K1 year
Compare downloads with other packages →
Also on577 r2u4 autocran181 c2d4u

Repository

76Stars
19Forks
4Open issues
0Open PRs
11Releases
832Commits
5Commit identities
832 commits · Last activity 2026-01-15 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
50%
Median days to close, 50 most recently updated closed issues
2
Median days to close, 50 most recently updated closed PRs
4

Stars over time

2025-08-08 · 732026-09-21 · 76
PracticesBeta

8 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/andrewzm/frk on 2026-10-18.

Continuous integration (3)
GitHub ActionsR CMD check workflowTravis CI (config file)

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-01-15 · The repository has a site deploy workflow

Coverage (1)
Coverage reporting
CRAN release process (1)
cran-comments.md
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
30 external dependencies (excludes base and recommended)

Installing FRK adds 116 packages (67 with compiled code, 117 MB of source tarballs). Heaviest: stringi 11 MB, sf 9.3 MB, ggplot2 6.0 MB.

Depends (1)
R >= 3.5.0
LinkingTo (3)
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Depends, Imports or LinkingTo, most downloaded first

Datasets

People & History

People (2)
Author, Maintainer since 0.1.1 (2017)
Author · added in 2.0.0
Listed in earlier versions (4)
Show 4 peopleHide 4 people
no longer listed · 0.1.2 to 0.1.8
no longer listed · 0.1.2 to 0.1.8
no longer listed · 0.1.2 to 0.1.8
no longer listed · 0.1.2 to 0.1.8
Releases (30)

Pick two releases to compare their code metrics.

Show 26 earlier eventsHide 26 earlier events
  • R
    R 4.2.0 released · 2022-04-22
  • 2.0.5
    record
    2022-03-25 · diff ↗
  • 2.0.4
    record
    2022-02-18 · diff ↗
  • 2.0.3
    record
    2022-01-10 · diff ↗
  • 2.0.2
    record
    2021-11-16 · diff ↗
  • 2.0.1
    record
    2021-10-11 · diff ↗ ·
    added 1 export
    combine_basis
  • 2.0.0
    record
    2021-05-28 · diff ↗ ·
    added 4 exports
    observed_BAUs, plot, plot_spatial_or_ST, unobserved_BAUs
  • R
    R 4.1.0 released · 2021-05-18
  • 1.0.0
    record
    2021-02-22 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 0.2.2.1
    record
    2020-04-01 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 0.2.2
    record
    2018-07-13 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 0.2.1
    record
    2018-04-13 · diff ↗ ·
    added 2 exports
    Basis, predict
  • 0.1.8
    record
    2018-01-13 · diff ↗
  • 0.1.7
    record
    2018-01-07 · diff ↗ ·
    added 3 exports
    coef, info_fit, loglik
  • 0.1.6
    record
    2017-10-13 · diff ↗
  • 0.1.5
    record
    2017-08-08 · diff ↗ ·
    removed 2 exports
    Basis_as_data.frame, TensorP_Basis_as_data.frame
  • 0.1.4
    record
    2017-06-14 · diff ↗ ·
    added 1 export
    remove_basis
  • 0.1.3
    record
    2017-05-05 · diff ↗ ·
    added 1 export
    BAUs_from_points
  • 0.1.2
    record
    2017-04-21 · diff ↗ ·
    removed 2 exports
    sp_to_ST_basis, timeline
    added 2 exports
    Basis_as_data.frame, TensorP_Basis_as_data.frame
  • R
    R 3.4.0 released · 2017-04-21
  • 0.1.1
    record
    2017-03-07
  • removedRemoved from CRAN
    2017-02-05
    correct copyright information was missing. Re-added 2017-03-07
  • R
    R 3.3.0 released · 2016-05-03

Package metadata

First published
2017-03-07
Total releases
30 / 9 yrs
License
GPL (>= 2) OSI
Additional repositories
andrewzm.github.io
Minimum R
≥ 3.5.0
Bundled data
2.5 MB / 6 files
Download size
4.4 MB
Appears in task views

Cite

Cite this package

Run in R for the authors' entry:

citation("FRK")

The package provides a citation file, so citation() returns the authors' own entry.

It points to 10.18637/jss.v098.i04, 10.18637/jss.v108.i10.

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 FRK version 2.3.2 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, 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