vario: Calculate uni- and multi-variate variograms

View source: R/vario.R

varioR Documentation

Calculate uni- and multi-variate variograms

Description

This code is largely modified from the 'vegan' function 'mso' by Helene Wagner, also parts of this code were derived from the 'geoR' function 'vairog' by Paulo J. Ribeiro Jr. and Peter J. Diggle. Citations: Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, Peter R. Minchin, R. B. O'Hara, Gavin L. Simpson, Peter Solymos, M. Henry H. Stevens and Helene Wagner (2011). vegan: Community Ecology Package. R package version 2.0-2. http://CRAN.R-project.org/package=vegan Paulo J. Ribeiro Jr & Peter J. Diggle geoR: a package for geostatistical analysis R-NEWS, 1(2):15-18. June, 2001

Usage

vario(
  x,
  coord,
  grain = 1,
  breaks = NA,
  log = FALSE,
  hmin = NA,
  hmax = NA,
  round.int = FALSE,
  pos.neg = FALSE,
  binary = TRUE,
  snap = NA,
  median = FALSE,
  quants = NA,
  direction = "omnidirectional",
  tolerance = pi/8,
  unit.angle = c("radians", "degrees"),
  distance.metric = "euclidean",
  univariate = FALSE
)

Arguments

x

an object of class 'sim' or may be a sitexsp matrix, a vector of values, if x is the later then missing samples should be coded as -999

coord

the spatial coordinates

grain

interval size for distance classes, only used if 'breaks' not supplied

breaks

the spatial breaks that define the spatial lags to be compared

hmax

the maximum spatial lag

pos.neg

if TRUE the positive and negative parts of the covariance matrix are output

binary

if TRUE and x is class sim then abundances are converted to binary 0 1 values

snap

indicates which generation from an object class 'sim' to draw from

median

indicates if in addition to the mean the medians of the distance matrices are calculated

direction

a numerical value for the directional (azimuth) angle. This used to specify directional variograms. Default defines the omnidirectional variogram. The value must be in the interval [0, pi] radians ([0, 180] degrees).

tolerance

numerical value for the tolerance angle, when computing directional variograms. The value must be in the interval [0, pi/2] radians ([0, 90] degrees). Defaults to pi/8.

unit.angle

defines the unit for the specification of angles in the two previous arguments. Options are 'radians' and 'degrees', with default to 'radians'.

distance.metric

can be one of the speices turnover metrics listed by the vegan function vegdist(). This is only appropriate if pos.neg = FALSE. Common options include, 'jaccard' and 'bray'. If computed on pres/abse data then soreson index is computed by 'bray'.

round.up

if TRUE the spatial lags are rounded up to nearest integer

min

minimum value

max

maximum value

Details

Note: that if some areas are unsampled that obs != pos + neg + exp

Examples

x = matrix(runif(100), ncol=10, nrow=10)
coord = cbind(1:10, 1)
vario(x, coord)
## Not run: 
library(vegan)
data(mite)
data(mite.xy)
vario(as.matrix(mite), mite.xy)
vario(as.matrix(mite), mite.xy, pos.neg=T)

## End(Not run)

mcglinnlab/vario documentation built on Feb. 22, 2023, 1:49 p.m.