s.match {adegraphics}R Documentation

2-D scatter plot of the matching between two sets of coordinates

Description

This function represents a two dimensional scatter plot linking paired coordinates.

Usage

s.match(dfxy1, dfxy2, xax = 1, yax = 2, labels =
  row.names(as.data.frame(dfxy1)), arrows = TRUE, 
  facets = NULL, plot = TRUE, storeData = TRUE, 
  add = FALSE, pos = -1, ...)

Arguments

dfxy1

a data frame, the first system of coordinates, used to produce the plot

dfxy2

a data frame, the second system of coordinates, with as many rows as dfxy1, used to produce the plot.

labels

a vector of character strings containing the matches' labels

xax

an integer (or a vector) indicating which column(s) of dfxy is(are) plotted on the x-axis

yax

an integer (or a vector) indicating which column(s) of dfxy is(are) plotted on the y-axis

arrows

a logical to draw arrows

facets

a factor splitting the rows of dfxy so that subsets of the data are represented on different sub-graphics

plot

a logical indicating if the graphics is displayed

storeData

a logical indicating if the data should be stored in the returned object. If FALSE, only the names of the data arguments are stored

add

a logical. If TRUE, the graphic is superposed to the graphics already plotted in the current device

pos

an integer indicating the position of the environment where the data are stored, relative to the environment where the function is called. Useful only if storeData is FALSE

...

additional graphical parameters (see adegpar and trellis.par.get)

Value

An object of class ADEg (subclass S2.match) or ADEgS (if add is TRUE and/or if facets or vectors for xax/yax are used).
The result is displayed if plot is TRUE.

Author(s)

Alice Julien-Laferriere, Aurelie Siberchicot aurelie.siberchicot@univ-lyon1.fr and Stephane Dray

See Also

S2.match ADEg.S2

Examples

X <- data.frame(x = runif(50, -1, 2), y = runif(50, -1, 2))
Y <- X + rnorm(100, sd = 0.3)
g1 <- s.match(X, Y, arr = TRUE, ppoints.cex = 2, ppoints.col = c("blue", "green"))

data(doubs, package = "ade4")
dudi1 <- ade4::dudi.pca(doubs$env, scale = TRUE, scannf = FALSE, nf = 3)
dudi2 <- ade4::dudi.pca(doubs$fish, scale = FALSE, scannf = FALSE, nf = 2)
coin1 <- ade4::coinertia(dudi1, dudi2, scannf = FALSE, nf = 2)
g2 <- s.match(dfxy1 = coin1$mX, dfxy2 = coin1$mY)

[Package adegraphics version 1.0-21 Index]