Learn R Programming

pedometrics (version 0.12.1)

variogramBins: Variogram binning

Description

Computation of bins for sample (experimental) variograms.

Usage

variogramBins(
  coords,
  n.lags = 7,
  type = "exp",
  cutoff = 0.5,
  base = 2,
  zero = 0.001,
  count = "pairs"
)

vgmLags( coords, n.lags = 7, type = "exp", cutoff = 0.5, base = 2, zero = 0.001, count = "pairs" )

Arguments

coords

Data frame or matrix with the projected x- and y-coordinates.

n.lags

Integer value defining the number of variogram bins (distance classes) that should be computed. Defaults to n = 7.

type

Character value defining the type of variogram bins that should be computed, with options "equi" (equidistant, equal-width) and "exp" (exponential, exponentially growing). Defaults to type = "exp".

cutoff

Numeric value defining the fraction of the diagonal of the rectangle that spans the data (bounding box) that should be used to set the maximum distance up to which variogram bins should be computed. Defaults to cutoff = 0.5, i.e. half the diagonal of the bounding box.

base

Numeric value defining the base of the exponential expression used to create exponentially growing variogram bins. Used only when type = "exp". Defaults to base = 2, i.e. the width of the rightmost bin is equal to half the diagonal of cutoff, and so on.

zero

Numeric value setting the minimum pair-wise separation distance that should be used to compute the variogram bins. Defaults to zero = 0.0001.

count

Should the number of points ("points") or point-pairs ("pairs") per variogram bin be computed? Defaults to count = "pairs".

Value

Vector of numeric values with the lower and upper boundaries of the variogram bins. The number of points or point-pairs per variogram bin is returned as an attribute.

Dependencies

The SpatialTools package, provider of tools for spatial data analysis in R, is required for variogramBins() to work. The development version of the SpatialTools package is available on https://github.com/jfrench/SpatialTools while its old versions are available on the CRAN archive at https://cran.r-project.org/src/contrib/Archive/SpatialTools/.

Reverse dependencies

The spsann package, provider of methods for the optimization of sample configurations using spatial simulated annealing in R, requires variogramBins() for some of its functions to work. The development version of the spsann package is available on https://github.com/Laboratorio-de-Pedometria/spsann-package.

References

Truong, P. N.; Heuvelink, G. B. M.; Gosling, J. P. Web-based tool for expert elicitation of the variogram. Computers and Geosciences. v. 51, p. 390-399, 2013.

Examples

Run this code
# NOT RUN {
if (all(c(require(SpatialTools), require(sp)))) {
  data(meuse, package = "sp")
  lags_points <- variogramBins(coords = meuse[, 1:2], count = "points")
  lags_pairs <- variogramBins(coords = meuse[, 1:2], count = "pairs")
}
# }

Run the code above in your browser using DataLab