s.match.class {ade4}R Documentation

Scatterplot of two sets of coordinates and a partionning into classes

Description

Performs a graphical representation of two sets of coordinates (different colors and symbols) and a partitionning into classes

Usage

s.match.class(df1xy, df2xy, fac, wt = rep(1/nrow(df1xy), nrow(df1xy)), xax = 1, yax = 2, pch1 = 16, pch2 = 15, col1 = rep("lightgrey", nlevels(fac)), col2 = rep("darkgrey", nlevels(fac)), cpoint = 1, label = levels(fac), clabel = 1, cstar = 1, cellipse = 0, axesell = TRUE, xlim = NULL, ylim = NULL, grid = TRUE, addaxes = TRUE, cgrid = 1, include.origin = TRUE, origin = c(0, 0), sub = "", csub = 1.25, possub = "bottomleft", pixmap = NULL, contour = NULL, area = NULL, add.plot = FALSE)

Arguments

df1xy a dataframe with the first system of coordinates
df2xy a dataframe with the secocnd system of coordinates
fac a factor partitioning the rows of the data frame in classes
wt a vector of weights
xax a number indicating which column should be plotted on the x-axis
yax a number indicating which column should be plotted on the x-axis
pch1 if cpoint > 0, an integer specifying the symbol or the single character to be used for plotting points
pch2 if cpoint > 0, an integer specifying the symbol or the single character to be used for plotting points
col1 a color for symbols
col2 a color for symbols
cpoint a character size for plotting the points, used with par("cex")*cpoint. If zero, no points are drawn
label a vector of strings of characters for the couple labels
clabel if not NULL, a character size for the labels, used with par("cex")*clabel
cstar a number between 0 and 1 which defines the length of the star size
cellipse a positive coefficient for the inertia ellipse size
axesell a logical value indicating whether the ellipse axes should be drawn
xlim the ranges to be encompassed by the x axis, if NULL they are computed
ylim the ranges to be encompassed by the y axis, if NULL they are computed
grid a logical value indicating whether a grid in the background of the plot should be drawn
addaxes a logical value indicating whether the axes should be plotted
cgrid a character size, parameter used with par("cex")* cgrid to indicate the mesh of the grid
include.origin a logical value indicating whether the point "origin" should belong to the graph space
origin a fixed point in the graph space, for example c(0,0) for the origin of axes
sub a string of characters to be inserted as legend
csub a character size for the legend, used with par("cex")*csub
possub a string of characters indicating the sub-title position ("topleft", "topright", "bottomleft", "bottomright")
pixmap a pixmap object
contour a dataframe with 4 columns to plot the contour of the map : each row gives a segment (x1,y1,x2,y2)
area a dataframe of class 'area' to plot an areal map
add.plot if TRUE, add the plot to the current graphic device

Value

The matched call.

Author(s)

Stephane Dray dray@biomserv.univ-lyon1.fr

See Also

s.class, s.match

Examples

xy <- data.frame(matrix(rnorm(100),50,2))
xy[,1] <- xy[,1] + rep(seq(0,12,by=3),rep(10,5))
xy[,2] <- xy[,2] + rep(seq(0,12,by=3),rep(10,5))
fac <- gl(5,10)
xy2<-xy + matrix(rnorm(100),50,2) + 1
s.match.class(xy,xy2,fac)

Worked out examples


> library(ade4)
> ### Name: s.match.class
> ### Title: Scatterplot of two sets of coordinates and a partionning into
> ###   classes
> ### Aliases: s.match.class
> ### Keywords: multivariate hplot
> 
> ### ** Examples
> 
> xy <- data.frame(matrix(rnorm(100),50,2))
> xy[,1] <- xy[,1] + rep(seq(0,12,by=3),rep(10,5))
> xy[,2] <- xy[,2] + rep(seq(0,12,by=3),rep(10,5))
> fac <- gl(5,10)
> xy2<-xy + matrix(rnorm(100),50,2) + 1
> s.match.class(xy,xy2,fac)
> 
> 
> 
> 
> 

[Package ade4 Index]