Package: fields 16.2

Douglas Nychka

fields:Tools for Spatial Data

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 <doi:10.5065/D6W957CT>. 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.

Authors:Douglas Nychka [aut, cre], Reinhard Furrer [aut], John Paige [aut], Stephan Sain [aut], Florian Gerber [aut], Matthew Iverson [aut], Rider Johnson [aut]

fields_16.2.tar.gz
fields_16.2.tar.gz(r-4.5-noble)fields_16.2.tar.gz(r-4.4-noble)
fields_16.2.tgz(r-4.4-emscripten)fields_16.2.tgz(r-4.3-emscripten)
fields.pdf |fields.html
fields/json (API)

# Installfields in R:
install.packages('fields',repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/dnychka/fieldsrpackage/issues

Datasets:
  • CO.Grid - Monthly surface meterology for Colorado 1895-1997
  • CO.elev - Monthly surface meterology for Colorado 1895-1997
  • CO.elevGrid - Monthly surface meterology for Colorado 1895-1997
  • CO.id - Monthly surface meterology for Colorado 1895-1997
  • CO.loc - Monthly surface meterology for Colorado 1895-1997
  • CO.names - Monthly surface meterology for Colorado 1895-1997
  • CO.ppt - Monthly surface meterology for Colorado 1895-1997
  • CO.ppt.MAM - Monthly surface meterology for Colorado 1895-1997
  • CO.ppt.MAM.climate - Monthly surface meterology for Colorado 1895-1997
  • CO.tmax - Monthly surface meterology for Colorado 1895-1997
  • CO.tmax.MAM - Monthly surface meterology for Colorado 1895-1997
  • CO.tmax.MAM.climate - Monthly surface meterology for Colorado 1895-1997
  • CO.tmean.MAM.climate - Monthly surface meterology for Colorado 1895-1997
  • CO.tmin - Monthly surface meterology for Colorado 1895-1997
  • CO.tmin.MAM - Monthly surface meterology for Colorado 1895-1997
  • CO.tmin.MAM.climate - Monthly surface meterology for Colorado 1895-1997
  • CO.years - Monthly surface meterology for Colorado 1895-1997
  • CO2 - Simulated global CO2 observations
  • CO2.true - Simulated global CO2 observations
  • NorthAmericanRainfall - Observed North American summer precipitation from the historical climate network.
  • NorthAmericanRainfall2 - Observed North American summer precipitation from the historical climate network.
  • PRISMelevation - 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
  • RMelevation - Monthly total precipitation (mm) for August 1997 in the Rocky Mountain Region and some gridded 4km elevation data sets (m).
  • US.dat - Outline of coterminous US and states.
  • WorldBankCO2 - Carbon emissions and demographic covariables by country for 1999.
  • glacier - Franke's Glacier Elevation Data
  • lennon - Gray image of John Lennon.
  • ozone2 - Daily 8-hour ozone averages for sites in the Midwest
  • rat.diet - Experiment studying an appetite supressant in rats.

298 exports 2 stars 8.59 score 5 dependencies 283 dependents 32.6k downloads

Last updated 8 days agofrom:800e82da28

Exports:[.spatialDesignadd.imageaddColorBarTriangleaddLegendaddMarginsGridListaddToDiagCarrow.plotas.imageas.surfaceaverage.imageBDbisection.searchboxplotVGrambplotbplot.xybubblePlotcat.matrixcat.to.listceiling2checkPredictGridChicagoO3circulantEmbeddingcirculantEmbeddingSetupcoef.Krigcolor.scalecolorBarcolorbar.plotcompactToMatcompactToMatCconfidenceIntervalMLEcover.designcrop.imagecrossCoVGramcsscubic.covddfinddescribedesigner.colorsdiscretize.imagedistMatHaversindistMatHaversin2dmaketdouble.expdrape.colordrape.plotdyadic.2checkdyadic.checkenvelopePlotevlpolyevlpoly2Exp.covExp.earth.covExp.image.covExp.simple.covExponentialExponentialUpperExponentialUpperCfast.1wayfastTpsfields.color.pickerfields.convert.gridfields.Dfields.derivative.polyfields.duplicated.matrixfields.evlpolyfields.evlpoly2fields.mkpolyfields.pochdownfields.pochupfields.rdist.nearfields.stylefields.x.to.gridfieldsPlotColorsfillGridfind.upcrossfindGridBoxfitted.Krigflamegauss.covgcv.sregget.rectanglegetVGMeangolden.section.searchhalf.imageigpolyimage.plotimage.smoothimagePlotimageplot.infoimageplot.setupimagePlotInfoin.land.gridin.polyin.poly.gridinpolyinterp.surfaceinterp.surface.FFTinterp.surface.gridKrigKrig.AmatrixKrig.check.xYKrig.coefKrig.df.to.lambdaKrig.engine.defaultKrig.engine.fixedKrig.fdfKrig.fgcvKrig.fgcv.modelKrig.fgcv.oneKrig.flplikeKrig.fs2hatKrig.ftraceKrig.make.uKrig.make.WKrig.make.WiKrig.null.functionKrig.parametersKrig.replicatesKrig.transform.xYKrig.updateYKrig.which.lambdaKrig.ynewKrigFindLambdalarry.colorsmake.surface.gridmakeMultiIndexmakePredictionGridListmakeSimulationGridMaternMatern.cor.to.rangematern.image.covminimax.critminitrimKrigmKrig.coefmKrig.tracemKrigCheckXYmKrigFastPredictmKrigFastPredictSetupmKrigJointTemp.fnmKrigMLEGridmKrigMLEJointmltdrbmultebCmultrbmultwendlandgmultWendlandGridoffGridWeightsoffGridWeights1DoffGridWeights2DPaciorek.covparse.grid.listplot.Krigplot.qsregplot.spatialDesignplot.spatialProcessplot.sregplot.surfaceplot.vgramplot.vgram.matrixplotMatrixpoly.imagepoly.image.regridpredict.fastTpspredict.interp.surfacepredict.Krigpredict.mKrigpredict.qsregpredict.sregpredict.surfacepredict.surface.defaultpredict.TpspredictDerivative.KrigpredictSEpredictSE.KrigpredictSE.mKrigpredictSEUsingKrigApredictSurfacepredictSurface.defaultpredictSurface.fastTpspredictSurface.KrigpredictSurface.mKrigpredictSurfaceSEpredictSurfaceSE.defaultprint.Krigprint.mKrigprint.mKrigSummaryprint.qsregprint.spatialDesignprint.spatialProcessprint.spatialProcessSummaryprint.sregprint.summary.Krigprint.summary.sregprint.summarySpatialDesignprintGCVWarningsprofileCIprofileMLEpushpinqr.q2tyqr.yq2qsregQSregqsreg.fitqsreg.psiqsreg.psi.OLDqsreg.sigmaqsreg.sigma.OLDqsreg.traceQTpsquickPrintquilt.plotRad.covRad.image.covRad.simple.covradbasradbas.constantRadialBasisrat.dietrcssrdistrdist.earthrdist.earth.vecrdist.vecRdistCRdistEarthresid.Krigribbon.plotRMprecipset.panelsetup.image.smoothsetupLegendsim.Krigsim.rfsim.spatialProcesssimLocal.spatialProcesssimSpatialDatasmooth.2dsnow.colorsspam2fullspam2spindspatialProcessspatialProcessSetDefaultsspind2fullspind2spamsplintsregsreg.df.to.lambdasreg.fdfsreg.fgcvsreg.fgcv.modelsreg.fgcv.onesreg.fitsreg.fs2hatsreg.tracestationary.covstationary.image.covstationary.taper.covstatsstats.binsummary.Krigsummary.mKrigsummary.ncdfsummary.qsregsummary.spatialDesignsummary.spatialProcesssummary.sregsummaryGCV.KrigsummaryGCV.sregsupportsArgsurfacesurface.defaultsurface.Krigsurface.mKrigtest.for.zerotim.colorsTpsTps.covtransformxtwo.colorsunrollZGridunscaleUSvgramvgram.matrixWendlandWendland.betawendland.covwendland.evalwendland.image.covWendland2.2which.max.imagewhich.max.matrixworldworld.colorworld.landxlineyline

Dependencies:dotCall64mapsRcppspamviridisLite

Readme and manuals

Help Manual

Help pageTopics
Adds an image to an existing plot.add.image
Adds arrows to a plotarrow.plot
Creates image from irregular x,y,zas.image
Creates an "surface" object from grid values.as.surface
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.BD
boxplotbplot
Boxplots for conditional distributionbplot.xy
Data set of ozone measurements at 20 Chicago monitoring stations.ChicagoO3 ozone
Efficiently Simulates a Stationary 1 and 2D Gaussian random fieldscirculantEmbedding circulantEmbeddingSetup sim.rf
Simulated global CO2 observationsCO2 CO2.true
Monthly surface meterology for Colorado 1895-1997CO.elev CO.elevGrid CO.Grid CO.id CO.loc CO.names CO.ppt CO.ppt.MAM CO.ppt.MAM.climate CO.tmax CO.tmax.MAM CO.tmax.MAM.climate CO.tmean.MAM.climate CO.tmin CO.tmin.MAM CO.tmin.MAM.climate CO.years COmonthlyMet
Adds color scale strips to an existing plot.colorbar.plot
Convert Matrix from Compact Vector to Standard FormcompactToMat
Exponential family, radial basis functions,cubic spline, compactly supported Wendland family, stationary covariances and non-stationary covariances.cubic.cov Exp.cov Exp.simple.cov Paciorek.cov Rad.cov Rad.simple.cov stationary.cov stationary.taper.cov Tps.cov wendland.cov
Evaluate covariance over upper triangle of distance matrixExponentialUpper
Computes Space-Filling "Coverage" designs using Swapping Algorithmcover.design
Perspective plot draped with colors in the facets.drape.color drape.plot
Add a shaded the region between two functions to an existing plotenvelopePlot
Covariance functionsExponential Matern Matern.cor.to.range RadialBasis
fields - tools for spatial datafields-package fields
Testing fields functionsfields.tests test.for.zero
Fields supporting functionsfields.derivative.poly fields.duplicated.matrix fields.evlpoly fields.evlpoly2 fields.mkpoly
Using MKrig for predicting on a grid.mKrig.grid
fields - graphics hintsfields.color.picker fields.hints fields.style
Response surface experiment ionizing a reagentflame
Franke's Glacier Elevation Dataglacier
Some simple functions for working with gridded data and the grid format (grid.list) used in fields.discretize.image fields.convert.grid fields.x.to.grid grid list grid.list make.surface.grid makeMultiIndex parse.grid.list unrollZGrid
Exponential, Matern and general covariance functions for 2-d gridded locations.Exp.image.cov matern.image.cov Rad.image.cov stationary.image.cov wendland.image.cov
Draws an image plot with a legend strip for the color scale based on either a regular grid or a grid of quadrilaterals.image.plot
Kernel smoother for irregular 2-d dataimage.smooth setup.image.smooth
Some simple functions for subsetting imagesaverage.image crop.image get.rectangle half.image image2lz in.poly in.poly.grid which.max.image which.max.matrix
Draws an image plot with a legend strip for the color scale based on either a regular grid or a grid of quadrilaterals.addColorBarTriangle addLegend colorBar imagePlot plotMatrix setupLegend
Fast bilinear interpolator from a grid.fillGrid interp.surface interp.surface.FFT interp.surface.grid
Kriging surface estimatecoef.Krig fitted.Krig Krig resid.Krig
Smoother (or "hat") matrix relating predicted values to the dependent (Y) values.Krig.Amatrix
Default function to create fixed matrix part of spatial process model.Krig.null.function
Collapse repeated spatial locations into unique locationsKrig.replicates
Finds profile likelihood and GCV estimates of smoothing parameters for splines and Kriging.gcv.sreg KrigFindLambda
Gray image of John Lennon.lennon
Mini triathlon resultsminitri
"micro Krig" Spatial process estimate of a curve or surface, "kriging" with a known covariance function.mKrig mKrig.coef mKrig.trace mKrigCheckXY predict.mKrig print.mKrig print.mKrigSummary summary.mKrig
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.mKrigJointTemp.fn mKrigMLEGrid mKrigMLEJoint profileCI
Observed North American summer precipitation from the historical climate network.NorthAmericanRainfall NorthAmericanRainfall2
Utilities for fast spatial prediction.addMarginsGridList findGridBox mKrigFastPredictSetup offGridWeights offGridWeights1D offGridWeights2D
Daily 8-hour ozone averages for sites in the Midwestozone2
Diagnostic and summary plots of a Kriging, spatialProcess or spline object.plot.Krig plot.sreg
Plots a surfaceplot.surface
Image plot for cells that are irregular quadrilaterals.poly.image poly.image.regrid
Evaluation of Krig spatial process estimate.predict.fastTps predict.Krig predict.Tps predictDerivative.Krig
Standard errors of predictions for Krig spatial process estimatepredictSE predictSE.Krig predictSE.mKrig predictSEUsingKrigA
Evaluates a fitted function or the prediction error as a surface that is suitable for plotting with the image, persp, or contour functions.mKrigFastPredict predictSurface predictSurface.default predictSurface.fastTps predictSurface.Krig predictSurface.mKrig predictSurfaceSE predictSurfaceSE.default
Print kriging fit results.print.Krig
Adds a "push pin" to an existing 3-d plotpushpin
Quantile or Robust spline regressionqsreg
Robust and Quantile smoothing using a thin-plate splineQSreg QTps
Useful plots for visualizing irregular spatial data.bubblePlot quilt.plot
Experiment studying an appetite supressant in rats.rat.diet
3-hour precipitation fields from a regional climate modelRCMexample
Euclidean distance matrix or vectorfields.rdist.near rdist rdist.vec
Great circle distance matrix or vectorrdist.earth rdist.earth.vec RdistEarth
Information objects that register C and FORTRAN functions.addToDiagC compactToMatC distMatHaversin distMatHaversin2 ExponentialUpperC mltdrb multebC multwendlandg RdistC
Adds to an existing plot, a ribbon of color, based on values from a color scale, along a sequence of line segments.ribbon.plot
Monthly total precipitation (mm) for August 1997 in the Rocky Mountain Region and some gridded 4km elevation data sets (m).PRISMelevation RMelevation RMprecip
Specify a panel of plotsset.panel
Unconditional and conditional simulation of a spatial processcheckPredictGrid makePredictionGridList makeSimulationGrid sim.Krig sim.spatialProcess simLocal.spatialProcess simSpatialData
Kernel smoother for irregular 2-d datasmooth.2d
Conversion of formats for sparse matricesspam2full spam2spind spind2full spind2spam
Estimates a spatial process model.confidenceIntervalMLE plot.spatialProcess print.spatialProcess print.spatialProcessSummary profileMLE spatialProcess spatialProcessSetDefaults summary.spatialProcess
Cubic spline interpolationsplint
Cubic smoothing spline regressionpredict.sreg sreg
Calculate summary statisticsstats
Bins data and finds some summary statistics.stats.bin
Summary for Krig or spatialProcess estimated models.summary.Krig
Summarizes a netCDF file handlesummary.ncdf
Tests if function supports a given argumentsupportsArg
Plots a surface and contourssurface.Krig surface.mKrig
Basic linear algebra utilities and other computations supporting the Krig function.%d*% Krig.check.xY Krig.coef Krig.engine.default Krig.engine.fixed Krig.make.u Krig.make.W Krig.make.Wi Krig.transform.xY
Some useful color tables for images and tools to handle them.color.scale designer.colors fieldsPlotColors larry.colors snow.colors tim.colors two.colors
Thin plate spline regressionfastTps Tps
Linear transformationtransformx
Plot of the US with state boundariesUS
Outline of coterminous US and states.US.dat
Traditional or robust variogram methods for spatial databoxplotVGram crossCoVGram getVGMean plot.vgram vgram
Computes a variogram from an imageplot.vgram.matrix vgram.matrix
Wendland family of covariance functions and supporting numerical functionsfields.D fields.pochdown fields.pochup Wendland Wendland.beta wendland.eval Wendland2.2
Plot of the worldin.land.grid world world.color world.land
Carbon emissions and demographic covariables by country for 1999.WorldBankCO2
Draw a vertical linexline
Draw horizontal linesyline