Learn R Programming

StatDA (version 1.5)

varioCalc: Variogram Calculation

Description

This function calculates (and plots) a variogram.

Usage

varioCalc(X, Y, el, max.dist = 300, title = "", km = TRUE, plot = TRUE)

Arguments

X
X-coordinate
Y
Y-coordinate
el
vector or matrix with data values
max.dist
a numerical value defining the maximum distance for the variogram. All pairs of locations separated for a distance larger than this value are ignored in the variogram calculation.
title
title for the plot
km
if TRUE the distances are given in km, otherwise the unit is m
plot
if TRUE the variogram is plotted, otherwise only the parameters are returned

Value

  • vario.ba omnidirectional variogram

Details

A omnivariogram, E-W and N-S variogram is calculated and then the results are plotted.

References

C. Reimann, P. Filzmoser, R.G. Garrett, and R. Dutter: Statistical Data Analysis Explained. Applied Environmental Statistics with R. John Wiley and Sons, Chichester, 2008.

See Also

variog

Examples

Run this code
data(ohorizon)
X=ohorizon[,"XCOO"]
Y=ohorizon[,"YCOO"]
vario.b=varioCalc(X,Y,el=ohorizon[,"Hg"],max.dist=300000,title=paste("Hg","in O-horizon"),
km=FALSE)

Run the code above in your browser using DataLab