Description Usage Arguments Details Value Author(s) Examples
The function computes the centre of a set of distance classes from a (geographical) distance matrix or a data frame containing the point coordinates. The minimum, maximum and interval distances can be customized. The function returns a vector that can be used to feed the function svariog
.
1 |
dist |
A |
dmin |
The minimum distance to be considered. Default is 0. |
distance.lag |
The distance increment between two successive centre of distance classes. A default value is computed on the basis of the function |
dist.lag.max |
The maximum distance to be considered. |
distlag
creates a set of bins describing the distance classes on the basis of the point spatial location and a user-defined lag interval. Spatial information is provided as a distance matrix (class dist
) or a set of coordinates (data.frame
). Data frame must contain 1 or 2 columns (i.e. data points in 1 or 2 dimensions). NAs are not allowed and should be removed prior to using the function.
A vector of values corresponding to the centre of successive distance classes
Jean-Pierre Rossi <ggene.package@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(sim03)
# check sampling scheme
plot(sim03$coord[,1],sim03$coord[,2], asp=1)
# changing the distance interval
distlag(dist=sim03$coord,dmin=0, distance.lag=0.5, dist.lag.max=NULL)
distlag(dist=sim03$coord,dmin=0, distance.lag=2, dist.lag.max=NULL)
# changing the maximum distance to be considered
x <- y <- seq(0,10, length.out=10)
coord <- expand.grid(x=x, y=y)
distlag(dist=coord,dmin=0.5, distance.lag=1, dist.lag.max=NULL)
distlag(dist=coord,dmin=0.5, distance.lag=1, dist.lag.max=10)
# using a distance matrix
m<-dist(coord)
distlag(dist=m)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.