Some R
packages that are useful for digital soil mapping
Notwithstanding to the rich statistical and analytical resource provide through the R
base functionality, the following R
packages (and their contained functions) are what I think are an invaluable resource for doing digital soil mapping.
There are four main groups of tasks that are critical for implementing DSM in general. These are:
- Soil science and pedometric type tasks
- Using GIS tools and related GIS tasks
- Calibrating models
- Making maps, plotting etc.
The following are short introductions about those packages that fall into these categories.
Soil science and pedometrics
-
Various
R
packages andR
functions that i have had a hand in developing can be found on the software page of this website. -
ithir
: Soil data and functions. A necessaryR
package to have for following the R workflows throughout these pages dedicated to doing digital soil mapping withR
. -
aqp
: Algorithms for quantitative pedology. A collection of algorithms related to modeling of soil resources, soil classification, soil profile aggregation, and visualization.
GIS stuff
-
RSAGA
provides access to geocomputing and terrain analysis functions of SAGA GIS from withinR
by running the command line version of SAGA.RSAGA
furthermore provides severalR
functions for handling ASCII grids, including a flexible framework for applying local functions (including predict methods of fitted models) and focal functions to multiple grids. -
qgisprocess
provide anR
interface to the geoprocessing algorithms of QGIS, a popular and open source desktop geographic information system (GIS) program.
Modelling
-
caret
has an extensive range of functions for training and plotting classification and regression models. See the caret website for more detailed information. -
Cubist
does regression modeling using rules with added instance-based corrections. Cubist models were developed by Ross Quinlan. Further information can be found at Rulequest -
C5.0
does C5.0 decision trees and rule-based models for pattern recognition. Another model structure developed by Ross Quinlan. -
gam
has functions for fitting and working with generalized additive models. -
nnet
is software for feed-forward neural networks with a single hidden layer, and for multinomial log-linear models. -
gstat
is for doing geostatistics. Variogram modelling, simple, ordinary and universal point or block (co)kriging, sequential Gaussian or indicator (co)simulation; variogram and variogram map plotting utility functions. A related and useful package isautomap
, which performs an automatic interpolation by automatically estimating the variogram and then callinggstat
.
Mapping and plotting
- Besides using the base plotting functionality, another useful plotting package is
ggplot2
. This package is an implementation of the grammar of graphics inR
. It combines the advantages of both base and lattice graphics: conditioning and shared axes are handled automatically, and you can still build up a plot step by step from multiple data sources. It also implements a sophisticated multidimensional conditioning system and a consistent interface to map data to aesthetic attributes. See the ggplot2 website for more information, documentation and examples.