coords.aniso | R Documentation |
Transforms or back-transforms a set of coordinates according to the geometric anisotropy parameters.
coords.aniso(coords, aniso.pars, reverse = FALSE)
coords |
an |
aniso.pars |
a vector with two elements, |
reverse |
logical. Defaults to |
Geometric anisotropy is defined by two parameters:
defined here as the azimuth angle of the direction with greater spatial continuity, i.e. the angle between the y-axis and the direction with the maximum range.
defined here as the ratio between the ranges of the directions with greater and smaller continuity, i.e. the ratio between maximum and minimum ranges. Therefore, its value is always greater or equal to one.
If reverse = FALSE
(the default) the
coordinates are transformed from the anisotropic space to the isotropic
space.
The transformation consists in multiplying the original
coordinates by a rotation matrix R
and a
shrinking matrix T
, as follows:
X_m = X R T ,
where X_m
is a matrix with the modified coordinates (isotropic
space) , X
is a matrix with original coordinates (anisotropic
space), R
rotates coordinates according to the anisotropy angle
\psi_A
and T
shrinks the coordinates according to
the anisotropy ratio \psi_R
.
If reverse = TRUE
, the back-transformation is performed, i.e.
transforming the coordinates from the isotropic space to the
anisotropic space by computing:
X = X_m (R T)^{-1}
An n \times 2
matrix with the transformed coordinates.
Paulo Justiniano Ribeiro Jr. paulojus@leg.ufpr.br
Peter J. Diggle p.diggle@lancaster.ac.uk.
Further information on the package geoR can be found at:
http://www.leg.ufpr.br/geoR/.
op <- par(no.readonly = TRUE)
par(mfrow=c(3,2))
par(mar=c(2.5,0,0,0))
par(mgp=c(2,.5,0))
par(pty="s")
## Defining a set of coordinates
coords <- expand.grid(seq(-1, 1, l=3), seq(-1, 1, l=5))
plot(c(-1.5, 1.5), c(-1.5, 1.5), xlab="", ylab="", type="n")
text(coords[,1], coords[,2], 1:nrow(coords))
## Transforming coordinates according to some anisotropy parameters
coordsA <- coords.aniso(coords, aniso.pars=c(0, 2))
plot(c(-1.5, 1.5), c(-1.5, 1.5), xlab="", ylab="", type="n")
text(coordsA[,1], coordsA[,2], 1:nrow(coords))
##
coordsB <- coords.aniso(coords, aniso.pars=c(pi/2, 2))
plot(c(-1.5, 1.5), c(-1.5, 1.5), xlab="", ylab="", type="n")
text(coordsB[,1], coordsB[,2], 1:nrow(coords))
##
coordsC <- coords.aniso(coords, aniso.pars=c(pi/4, 2))
plot(c(-1.5, 1.5), c(-1.5, 1.5), xlab="", ylab="", type="n")
text(coordsC[,1], coordsC[,2], 1:nrow(coords))
##
coordsD <- coords.aniso(coords, aniso.pars=c(3*pi/4, 2))
plot(c(-1.5, 1.5), c(-1.5, 1.5), xlab="", ylab="", type="n")
text(coordsD[,1], coordsD[,2], 1:nrow(coords))
##
coordsE <- coords.aniso(coords, aniso.pars=c(0, 5))
plot(c(-1.5, 1.5), c(-1.5, 1.5), xlab="", ylab="", type="n")
text(coordsE[,1], coordsE[,2], 1:nrow(coords))
##
par(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.