Learn R Programming

⚠️There's a newer version (16.3) of this package.Take me there.

fields (version 15.2)

Tools for Spatial Data

Description

For curve, surface and function fitting with an emphasis on splines, spatial data, geostatistics, and spatial statistics. The major methods include cubic, and thin plate splines, Kriging, and compactly supported covariance functions for large data sets. The splines and Kriging methods are supported by functions that can determine the smoothing parameter (nugget and sill variance) and other covariance function parameters by cross validation and also by restricted maximum likelihood. For Kriging there is an easy to use function that also estimates the correlation scale (range parameter). A major feature is that any covariance function implemented in R and following a simple format can be used for spatial prediction. There are also many useful functions for plotting and working with spatial data as images. This package also contains an implementation of sparse matrix methods for large spatial data sets and currently requires the sparse matrix (spam) package. Use help(fields) to get started and for an overview. The fields source code is deliberately commented and provides useful explanations of numerical details as a companion to the manual pages. The commented source code can be viewed by expanding the source code version and looking in the R subdirectory. The reference for fields can be generated by the citation function in R and has DOI . Development of this package was supported in part by the National Science Foundation Grant 1417857, the National Center for Atmospheric Research, and Colorado School of Mines. See the Fields URL for a vignette on using this package and some background on spatial statistics.

Copy Link

Version

Install

install.packages('fields')

Monthly Downloads

46,589

Version

15.2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Douglas Nychka

Last Published

August 17th, 2023

Functions in fields (15.2)

NorthAmericanRainfall

Observed North American summer precipitation from the historical climate network.
Krig.replicates

Collapse repeated spatial locations into unique locations
RMprecip

Monthly total precipitation (mm) for August 1997 in the Rocky Mountain Region and some gridded 4km elevation data sets (m).
RCMexample

3-hour precipitation fields from a regional climate model
Tps

Thin plate spline regression
US.dat

Outline of coterminous US and states.
Wendland

Wendland family of covariance functions and supporting numerical functions
US

Plot of the US with state boundaries
KrigFindLambda

Finds profile likelihood and GCV estimates of smoothing parameters for splines and Kriging.
QTps

Robust and Quantile smoothing using a thin-plate spline
arrow.plot

Adds arrows to a plot
colorbar.plot

Adds color scale strips to an existing plot.
bplot.xy

Boxplots for conditional distribution
as.image

Creates image from irregular x,y,z
cover.design

Computes Space-Filling "Coverage" designs using Swapping Algorithm
bplot

boxplot
WorldBankCO2

Carbon emissions and demographic covariables by country for 1999.
as.surface

Creates an "surface" object from grid values.
add.image

Adds an image to an existing plot.
compactToMat

Convert Matrix from Compact Vector to Standard Form
envelopePlot

Add a shaded the region between two functions to an existing plot
fields.grid

Using MKrig for predicting on a grid.
drape.plot

Perspective plot draped with colors in the facets.
fields testing scripts

Testing fields functions
fields internal

Fields internal and secondary functions
fields-stuff

Fields supporting functions
Covariance functions

Exponential family, radial basis functions,cubic spline, compactly supported Wendland family, stationary covariances and non-stationary covariances.
fields

fields - tools for spatial data
flame

Response surface experiment ionizing a reagent
fields.hints

fields - graphics hints
image.smooth

Kernel smoother for irregular 2-d data
image2lz

Some simple functions for subsetting images
grid list

Some simple functions for working with gridded data and the grid format (grid.list) used in fields.
glacier

Franke's Glacier Elevation Data
imagePlot

Draws an image plot with a legend strip for the color scale based on either a regular grid or a grid of quadrilaterals.
image.cov

Exponential, Matern and general covariance functions for 2-d gridded locations.
interp.surface

Fast bilinear interpolator from a grid.
image.plot

Draws an image plot with a legend strip for the color scale based on either a regular grid or a grid of quadrilaterals.
mKrig

"micro Krig" Spatial process estimate of a curve or surface, "kriging" with a known covariance function.
lennon

Gray image of John Lennon.
predictSE

Standard errors of predictions for Krig spatial process estimate
Chicago ozone test data

Data set of ozone measurements at 20 Chicago monitoring stations.
ozone2

Daily 8-hour ozone averages for sites in the Midwest
plot.Krig

Diagnostic and summary plots of a Kriging, spatialProcess or spline object.
predict.Krig

Evaluation of Krig spatial process estimate.
offGridWeights

Utilities for fast spatial prediction.
rdist.earth

Great circle distance matrix or vector
quilt.plot

Useful plots for visualizing irregular spatial data.
minitri

Mini triathlon results
rdist

Euclidean distance matrix or vector
poly.image

Image plot for cells that are irregular quadrilaterals.
predictSurface

Evaluates a fitted function or the prediction error as a surface that is suitable for plotting with the image, persp, or contour functions.
plot.surface

Plots a surface
mKrigMLE

Maximizes likelihood for the process marginal variance (sigma) and nugget standard deviation (tau) parameters (e.g. lambda) over a many covariance models or covariance parameter values.
registeringCode

Information objects that register C and FORTRAN functions.
rat.diet

Experiment studying an appetite supressant in rats.
print.Krig

Print kriging fit results.
splint

Cubic spline interpolation
stats

Calculate summary statistics
sreg

Cubic smoothing spline regression
pushpin

Adds a "push pin" to an existing 3-d plot
spam2lz

Conversion of formats for sparse matrices
set.panel

Specify a panel of plots
yline

Draw horizontal lines
vgram.matrix

Computes a variogram from an image
spatialProcess

Estimates a spatial process model.
vgram

Traditional or robust variogram methods for spatial data
stats.bin

Bins data and finds some summary statistics.
ribbon.plot

Adds to an existing plot, a ribbon of color, based on values from a color scale, along a sequence of line segments.
qsreg

Quantile or Robust spline regression
sim.spatialProcess

Unconditional and conditional simulation of a spatial process
transformx

Linear transformation
supportsArg

Tests if function supports a given argument
tim.colors

Some useful color tables for images and tools to handle them.
surface.Krig

Plots a surface and contours
circulantEmbedding

Efficiently Simulates a Stationary 1 and 2D Gaussian random fields
summary.Krig

Summary for Krig or spatialProcess estimated models.
smooth.2d

Kernel smoother for irregular 2-d data
xline

Draw a vertical line
world

Plot of the world
summary.ncdf

Summarizes a netCDF file handle
Krig.Amatrix

Smoother (or "hat") matrix relating predicted values to the dependent (Y) values.
Exponential, Matern, Radial Basis

Covariance functions
CO2

Simulated global CO2 observations
Krig

Kriging surface estimate
CovarianceUpper

Evaluate covariance over upper triangle of distance matrix
fields exported FORTRAN

FORTRAN subroutines used in fields functions
Krig.null.function

Default function to create fixed matrix part of spatial process model.
BD

Data frame of the effect of buffer compositions on DNA strand displacement amplification. A 4-d regression data set with with replication. This is a useful test data set for exercising function fitting methods.
The Engines:

Basic linear algebra utilities and other computations supporting the Krig function.
Colorado Monthly Meteorological Data

Monthly surface meterology for Colorado 1895-1997