Learn R Programming

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

fields (version 8.3-6)

Tools for Spatial Data

Description

For curve, surface and function fitting with an emphasis on splines, spatial data and spatial statistics. The major methods include cubic, and thin plate splines, Kriging and compact covariances for large data sets. The splines and Kriging methods are supporting by functions that can determine the smoothing parameter (nugget and sill variance) by cross validation and also by restricted maximum likelihood. For Kriging there is an easy to function that also estimates the correlation scale (range). A major feature is that any covariance function implemented in R and following a simple fields 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 in addition to the manual pages. The commented source code can be viewed by expanding the source code .tar.gz file and looking in R subdirectory.

Copy Link

Version

Install

install.packages('fields')

Monthly Downloads

43,868

Version

8.3-6

License

GPL (>= 2)

Maintainer

Douglas Nychka

Last Published

January 4th, 2016

Functions in fields (8.3-6)

fields.grid

Using MKrig for predicting on a grid.
bplot

boxplot
US.dat

Outline of coterminous US and states.
arrow.plot

Adds arrows to a plot
as.image

Creates image from irregular x,y,z
RCMexample

3-hour precipitation fields from a regional climate model
ribbon.plot

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

Plot of the US with state boundaries
WorldBankCO2

Carbon emissions and demographic covariables by country for 1999.
RMprecip

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

Fast bilinear interpolator from a grid.
CO2

Simulated global CO2 observations
add.image

Adds an image to an existing plot.
plot.Krig

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

Collapse repeated spatial locations into unique locations
Colorado Monthly Meteorological Data

Monthly surface meterology for Colorado 1895-1997
REML.test

Maximum Likelihood estimates for some Matern covariance parameters.
NorthAmericanRainfall

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

Finds profile likelihood and GCV estimates of smoothing parameters for splines and Kriging.
Krig.null.function

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

Some simple functions for subsetting images
sim.rf

Simulates a Stationary Gaussian random field
fields-stuff

Fields supporting functions
flame

Response surface experiment ionizing a reagent
bplot.xy

Boxplots for conditional distribution
stats.bin

Bins data and finds some summary statistics.
The Engines:

Basic linear algebra utilities and other computations supporting the Krig function.
minitri

Mini triathlon results
splint

Cubic spline interpolation
mKrig.MLE

Maximizes likelihood for the process marginal variance (rho) and nugget standard deviation (sigma) parameters (e.g. lambda) over a many covariance models or covariance parameter values.
Chicago ozone test data

Data set of ozone measurements at 20 Chicago monitoring stations.
surface.Krig

Plots a surface and contours
pushpin

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

Draw horizontal lines
Exponential, Matern, Radial Basis

Covariance functions
quilt.plot

Image plot for irregular spatial data.
world

Plot of the world
summary.ncdf

Summarizes a netCDF file handle
as.surface

Creates an "surface" object from grid values.
xline

Draw a vertical line
lennon

Gray image of John Lennon.
fields exported FORTRAN

FORTRAN subroutines used in fields functions
image.cov

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

Linear transformation
fields testing scripts

Testing fields functions
stats

Calculate summary statistics
Krig.Amatrix

Smoother (or "hat") matrix relating predicted values to the dependent (Y) values.
ozone2

Daily 8-hour ozone averages for sites in the Midwest
qsreg

Quantile or Robust spline regression
rdist

Euclidean distance matrix or vector
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.
CovarianceUpper

Evaluate covariance over upper triangle of distance matrix
predict.Krig

Evaluation of Krig spatial process estimate.
smooth.2d

Kernel smoother for irregular 2-d data
MLESpatialProcess

Estimates key covariance parameters for a spatial process.
supportsArg

Tests if function supports a given argument
predictSurface

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

Print kriging fit results.
fields

fields - tools for spatial data
rdist.earth

Great circle distance matrix or vector
plot.surface

Plots a surface
set.panel

Specify a panel of plots
compactToMat

Convert Matrix from Compact Vector to Standard Form
vgram

Traditional or robust variogram methods for spatial data
predictSE

Standard errors of predictions for Krig spatial process estimate
drape.plot

Perspective plot draped with colors in the facets.
tim.colors

Some useful color tables for images and tools to handle them.
cover.design

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

Thin plate spline regression
image.smooth

Kernel smoother for irregular 2-d data
Krig

Kriging surface estimate
sim.Krig

Conditional simulation of a spatial process
rat.diet

Experiment studying an appetite supressant in rats.
colorbar.plot

Adds color scale strips to an existing plot.
summary.Krig

Summary for Krig or spatialProcess estimated models.
QTps

Robust and Quantile smoothing using a thin-plate spline
grid list

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

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

Fields internal and secondary functions
sreg

Cubic smoothing spline regression
vgram.matrix

Computes a variogram from an image
image.plot

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

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

fields - graphics hints
Wendland

Wendland family of covariance functions and supporting numerical functions
spatialProcess

Estimates a spatial process model.
poly.image

Image plot for cells that are irregular quadrilaterals.
spam2lz

Conversion of formats for sparse matrices