Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

addline

Adds lines on graphics.


Description

Adds a trellis object containing one or several lines on one or several graphical objects.

Usage

addline(object, a = NULL, b = 0, h = NULL, v = NULL, plot = TRUE, ...)

Arguments

object

an object of class ADEg or ADEgS

a, b

coefficients of the line to be added, passed to the panel.abline function of the lattice package

h, v

numeric vectors giving locations respectively of horizontal and vertical lines to be added to the plot, in native coordinates, passed to the panel.abline function of the lattice package

plot

a logical indicating if the graphics is displayed

...

Other arguments. Additional graphical parameters (see the plines list in adegpar and trellis.par.get). If object is an ADEgS, the argument which identify which ADEg is/are used for superposition.

Value

An object of class ADEgS.

Author(s)

Aurelie Siberchicot aurelie.siberchicot@univ-lyon1.fr and Stephane Dray

See Also

Examples

# example extracted from the pedagogic file, here: http://pbil.univ-lyon1.fr/R/pdf/tdr65.pdf
data(monde84, package = "ade4")
dfX <- cbind.data.frame(lpib = log(monde84$pib), croipop = monde84$croipop)
dfY <- cbind.data.frame(lmorta = log(monde84$morta), lanal = log(monde84$anal + 1), 
  rscol = sqrt(100 - monde84$scol))
dfX0 <- ade4::scalewt(dfX)
dfY0 <- ade4::scalewt(dfY)
can1 <- cancor(dfX0, dfY0)
varcanoX <- dfX0
varcanoY <- dfY0
g1 <- s.label(cbind(varcanoY,varcanoX), labels = row.names(monde84), plabel.cex = 0.8, plot = FALSE)
addline(g1, 0, 1, plines.col = "red", plines.lwd = 0.5, plines.lty = 2)

adegraphics

An S4 Lattice-Based Package for the Representation of Multivariate Data

v1.0-15
GPL (>= 2)
Authors
Stéphane Dray <stephane.dray@univ-lyon1.fr> and Aurélie Siberchicot <aurelie.siberchicot@univ-lyon1.fr>, with contributions from Jean Thioulouse. Based on earlier work by Alice Julien-Laferrière.
Initial release
2018-12-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.