adegraphics/ 0000755 0001762 0000144 00000000000 14120626425 012526 5 ustar ligges users adegraphics/NAMESPACE 0000644 0001762 0000144 00000010763 14071042764 013757 0 ustar ligges users import("grDevices")
import("grid")
import("lattice")
import("utils")
importFrom("ade4", "as.randtest", "covfacwt", "covwt", "dudi.pca", "dudi.type", "inertia.dudi", "kplot", "meanfacwt", "scatter", "score", "varfacwt", "varwt")
importFrom("graphics", "hist", "plot")
importFrom("KernSmooth", "bkde", "bkde2D")
importFrom("latticeExtra", "panel.ellipse")
importFrom("methods", "callNextMethod", "new", "show", "validObject")
importFrom("RColorBrewer", "brewer.pal")
importFrom("sp", "GridTopology", "is.projected", "Polygon", "Polygons", "proj4string", "sp.grid", "sp.lines", "sp.points", "sp.polygons", "SpatialGrid", "SpatialPointsDataFrame", "SpatialPolygons", "SpatialPolygonsDataFrame", "sppanel")
importMethodsFrom("sp", "[", "bbox", "coerce", "coordinates", "over")
importClassesFrom("sp", "Spatial", "SpatialGrid", "SpatialGridDataFrame", "SpatialLines", "SpatialLinesDataFrame", "SpatialPoints", "SpatialPointsDataFrame", "SpatialPolygons", "SpatialPolygonsDataFrame")
importFrom("stats", "as.formula", "biplot", "coefficients", "dnorm", "formula", "lm", "loess", "predict", "quantile", "reorder", "runif", "screeplot", "weighted.mean")
S3method("biplot", "dudi")
S3method("kplot", "foucart")
S3method("kplot", "mbpcaiv")
S3method("kplot", "mcoa")
S3method("kplot", "mfa")
S3method("kplot", "pta")
S3method("kplot", "sepan")
S3method("kplot", "statis")
S3method("plot", "acm")
S3method("plot", "betcoi")
S3method("plot", "betdpcoa")
S3method("plot", "betwitdpcoa")
S3method("plot", "betrlq")
S3method("plot", "between")
S3method("plot", "coinertia")
S3method("plot", "discrimin")
S3method("plot", "dpcoa")
S3method("plot", "fca")
S3method("plot", "foucart")
S3method("plot", "inertia")
S3method("plot", "krandboot")
S3method("plot", "krandtest")
S3method("plot", "krandxval")
S3method("plot", "mcoa")
S3method("plot", "mfa")
S3method("plot", "multiblock")
S3method("plot", "multispati")
S3method("plot", "niche")
S3method("plot", "pcaiv")
S3method("plot", "procuste")
S3method("plot", "randboot")
S3method("plot", "randtest")
S3method("plot", "randxval")
S3method("plot", "rlq")
S3method("plot", "pta")
S3method("plot", "sepan")
S3method("plot", "statis")
S3method("plot", "witcoi")
S3method("plot", "witdpcoa")
S3method("plot", "within")
S3method("plot", "witrlq")
S3method("plot", "bcaloocv")
S3method("plot", "discloocv")
S3method("scatter", "coa")
S3method("scatter", "dudi")
S3method("scatter", "nipals")
S3method("scatter", "pco")
S3method("score", "acm")
S3method("score", "inertia")
S3method("score", "mix")
S3method("score", "pca")
S3method("screeplot", "dudi")
S3method("as.raster", "pixmapRGB")
S3method("as.raster", "pixmapGrey")
export(
"adegpar",
"adeg.panel.label",
"adeg.panel.edges",
"adeg.panel.nb",
"adeg.panel.Spatial",
"adeg.panel.values",
"adeg.panel.hist",
"adeg.panel.join",
"layout2position",
"changelatticetheme",
"sortparamADEg",
"sortparamADEgS",
"setlimits2D",
"setlimits1D",
"plotEig",
"ADEgS",
"s.label",
"s.corcircle",
"s.arrow",
"s.class",
"s.distri",
"s.value",
"s.image",
"s.logo",
"s.density",
"s.match",
"s.Spatial",
"s.traject",
"table.value",
"table.image",
"triangle.label",
"triangle.match",
"triangle.class",
"triangle.traject",
"s1d.label",
"s1d.class",
"s1d.curve",
"s1d.curves",
"s1d.density",
"s1d.distri",
"s1d.dotplot",
"s1d.gauss",
"s1d.hist",
"s1d.barchart",
"s1d.interval",
"s1d.match",
"s1d.boxplot",
"kplot",
"kplotsepan.coa",
"biplot",
"plot",
"scatter",
"score",
"screeplot"
)
exportMethods(
"[",
"[[",
"[[<-",
"+",
"$",
"length",
"names",
"names<-",
"cbindADEg",
"rbindADEg",
"add.ADEg",
"addhist",
"addline",
"addpoint",
"addsegment",
"addtext",
"getcall",
"getgraphics",
"getlatticecall",
"getparameters",
"getpositions",
"getstats",
"gettrellis",
"insert",
"panel",
"panelbase",
"plot",
"prepare",
"print",
"printSuperpose",
"setlatticecall",
"show",
"superpose",
"update",
"zoom"
)
exportClasses(
"ADEg",
"ADEgS",
"ADEg.C1",
"ADEg.S1",
"ADEg.S2",
"ADEg.T",
"ADEg.Tr",
"C1.barchart",
"C1.curve",
"C1.curves",
"C1.density",
"C1.dotplot",
"C1.gauss",
"C1.hist",
"C1.interval",
"S1.boxplot",
"S1.class",
"S1.distri",
"S1.label",
"S1.match",
"S2.arrow",
"S2.class",
"S2.corcircle",
"S2.density",
"S2.distri",
"S2.image",
"S2.label",
"S2.logo",
"S2.match",
"S2.traject",
"S2.value",
"T.cont",
"T.image",
"T.value",
"Tr.class",
"Tr.label",
"Tr.match",
"Tr.traject"
)
adegraphics/man/ 0000755 0001762 0000144 00000000000 14071042764 013304 5 ustar ligges users adegraphics/man/panel-methods.Rd 0000644 0001762 0000144 00000006176 13742303021 016333 0 ustar ligges users \name{panel-methods}
\docType{methods}
\alias{panel-methods}
\alias{panel}
\title{Methods \code{panel} for \code{ADEg} objects}
\description{
The method \code{panel} displays all specific graphical components.
}
\section{Methods}{
\describe{
\item{\code{signature(object = "C1.barchart")}}{
draws bar charts and labels}
\item{\code{signature(object = "C1.curve")}}{
draws points and curves}
\item{\code{signature(object = "C1.curves")}}{
draws multiple points and curves}
\item{\code{signature(object = "C1.density")}}{
draws density curves}
\item{\code{signature(object = "C1.dotplot")}}{
draws segments and dots}
\item{\code{signature(object = "C1.gauss")}}{
draws Gauss curves and level names of each curve}
\item{\code{signature(object = "C1.hist")}}{
draws rectangles}
\item{\code{signature(object = "C1.interval")}}{
draws segments or polygons}
\item{\code{signature(object = "S1.boxplot")}}{
draws box-and-wiskers diagrams, mean points and labels}
\item{\code{signature(object = "S1.class")}}{
draws labels and lines matching with score values}
\item{\code{signature(object = "S1.distri")}}{
draws mean points and segments with matching labels}
\item{\code{signature(object = "S1.label")}}{
draws labels and its links with score points}
\item{\code{signature(object = "S1.match")}}{
draws score points and matching segments and labels}
\item{\code{signature(object = "S2.arrow")}}{
draws points, arrows and labels}
\item{\code{signature(object = "S2.class")}}{
draws ellipses, convex hulls, stars, labels and points}
\item{\code{signature(object = "S2.corcircle")}}{
draws arrows, labels and axes}
\item{\code{signature(object = "S2.density")}}{
draws densities and external points}
\item{\code{signature(object = "S2.distri")}}{
draws ellipses, stars, labels and points}
\item{\code{signature(object = "S2.image")}}{
draws raster image}
\item{\code{signature(object = "S2.label")}}{
draws points and labels}
\item{\code{signature(object = "S2.logo")}}{
displays the logos}
\item{\code{signature(object = "S2.match")}}{
draws arrows and labels}
\item{\code{signature(object = "S2.traject")}}{
draws points, arrows and labels}
\item{\code{signature(object = "S2.value")}}{
draws symbols}
\item{\code{signature(object = "T.cont")}}{
draws mean points and regression lines}
\item{\code{signature(object = "T.image")}}{
draws raster image}
\item{\code{signature(object = "T.value")}}{
draws symbols}
\item{\code{signature(object = "Tr.class")}}{
draws arrows, labels and points}
\item{\code{signature(object = "Tr.label")}}{
draws lines, labels and points}
\item{\code{signature(object = "Tr.match")}}{
draws arrows, labels and points}
\item{\code{signature(object = "Tr.traject")}}{
draws arrows, labels and points}
}}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\keyword{methods}
adegraphics/man/S2.match-class.Rd 0000644 0001762 0000144 00000006375 13742303021 016256 0 ustar ligges users \name{S2.match-class}
\docType{class}
\alias{S2.match}
\alias{S2.match-class}
\alias{prepare,S2.match-method}
\alias{panel,S2.match-method}
\title{Class \code{S2.match}}
\description{
A class for the creation and display of paired coordinates in a bi-dimensional plot.
}
\section{Objects from the Class}{
\code{S2.match} objects can be created by calls of the form \code{new("S2.match", ...)}.
The regular usage in this package is to use the \code{s.match} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
\item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
\item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
\item{\code{labels}: a vector of character strings containing the matches' labels.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
The specific slot for \code{S2.match} objects is: \itemize{
\item{\code{arrows}: a logical to draw arrows.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S2}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S2.match} are:
\describe{
\item{prepare}{\code{signature(object = "S2.match")}:
calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "S2.match")}:
draws arrows and labels.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S2}}
\code{\link{s.match}}
}
\examples{
showClass("S2.match")
}
\keyword{classes}
adegraphics/man/S2.image-class.Rd 0000644 0001762 0000144 00000010174 13742303021 016234 0 ustar ligges users \name{S2.image-class}
\docType{class}
\alias{S2.image}
\alias{S2.image-class}
\alias{prepare,S2.image-method}
\alias{panel,S2.image-method}
\title{Class \code{S2.image}}
\description{
A class for the creation of a bi-dimensional plot with a third value represented as a continuous colored surface.
}
\section{Objects from the Class}{
\code{S2.image} objects can be created by calls of the form \code{new("S2.image", ...)}.
The regular usage in this package is to use the \code{s.image} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
\item{\code{z}: a vector (or a matrix) of values on the \code{dfxy} rows.}
\item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
\item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
The specific slots for \code{S2.image} objects are: \itemize{
\item{\code{gridsize}: a 1 or 2-length vector indicating the cell numbers (horizontally and vertically) of the grid for the colored surface.}
\item{\code{outsideLimits}: specific limits for the surface as a set of polygons. It must be an \code{SpatialPolygons} object. Hole are authorized.}
\item{\code{span}: a value to control the degree of smoothing.}
\item{\code{contour}: a logical to draw contour lines.}
\item{\code{region}: a logical to fill inter-contour regions.}
\item{\code{col}: a \code{NULL} value, a color or a colors vector used for the colored cells.}
}}
\item{\code{stats}}{a list of internal preliminary calculations.
The specific slot for \code{S2.image} objects is: \itemize{
\item{\code{value}: a prediction value yielded by a local polynomial regression fitting.}
}}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{newgrid}: the grid expansion calculated within the prepare method.}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S2}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S2.image} are:
\describe{
\item{prepare}{\code{signature(object = "S2.image")}:
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates grid expansion and limits.}
\item{panel}{\code{signature(object = "S2.image")}:
draws raster image.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S2}}
\code{\link{s.image}}
}
\examples{
showClass("S2.image")
}
\keyword{classes}
adegraphics/man/plot.inertia.Rd 0000644 0001762 0000144 00000011374 13742303021 016177 0 ustar ligges users \name{plot.inertia}
\alias{plot.inertia}
\alias{score.inertia}
\title{Display the decomposition of inertia which measure the contributions of
rows/columns in mutivariate methods}
\description{
S3 method to display the decomposition of inertia (\code{inertia} object)
which measure the contributions of rows/columns in mutivariate methods
(\code{dudi} objects from \code{ade4})
}
\usage{
\method{plot}{inertia}(x, xax = 1, yax = 2, threshold = 0.1,
contrib = c("abs", "rel"), type = c("label", "cross", "ellipse", "both"),
ellipseSize = 1.5, posieig = "none", plot = TRUE,
storeData = TRUE, pos = -1, \dots)
\method{score}{inertia}(x, xax = 1, threshold = 0.1, contrib = c("abs", "rel"),
posieig = "none", pos = -1, storeData = TRUE, plot = TRUE, \dots)
}
\arguments{
\item{x}{an object of the \code{dudi} class; it must be the output of a
correspondance analysis (\code{coa} object).}
\item{xax}{an integer indicating which column of {x} is plotted on the x-axis}
\item{yax}{an integer indicating which column of {x} is plotted on the y-axis.
If \code{yax} is equal to \code{xax}, a one-dimensional graph is display.}
\item{threshold}{a numeric value containing the contribution threshold
(between 0 and 1) at which points should be drawn on the graphic. Low
contribution points will be represented by a grey point and without label.
When the contributions are displayed on a single axis, a dotted line
describes the contribution threshold.}
\item{contrib}{a character value indicating which contributions are plotted:
\code{abs} for absolute contributions (rows/columns involved in the factor
axis/map construction) and \code{rel} for relative contribution (quality of
rows/columns representation on the factor axis/map).}
\item{type}{a character value indicating which type represents contribution.
Labels size (\code{label}), crosses size(\code{cross}) or ellipses size
(\code{ellipse}) can be proportional to the contributions. If \code{type} is
\code{both}, crosses and ellipses both have sizes proportional to the
contributions.}
\item{ellipseSize}{a positive number for ellipse size when \code{type} is
\code{ellipse}}
\item{posieig}{a character value or a two-length numeric vector (in normalized
parent coordinates \code{npc} from 0 to 1) or \code{none} value indicating
the position of the eigenvalues bar plot.}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
Returns an \code{ADEgS} object.
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Clément Claustre, Anne-Béatrice Dufour, Aurélie Siberchicot
\email{aurelie.siberchicot@univ-lyon1.fr} and Stéphane Dray
}
\examples{
# First example
data(bf88, package = "ade4")
coa1 <- ade4::dudi.coa(bf88$S1, scannf = FALSE, nf = 2)
###### row=T / col=F
res11 <- ade4::inertia(coa1, row = TRUE, col = FALSE, nf = 2)
g11 <- plot(res11, threshold = 0.06)
g12 <- plot(res11, threshold = 0.06, plabels.boxes.draw = TRUE, plines.lwd = 0,
light_row.ppoints.cex = 0, posieig = "bottomleft")
g13 <- score(res11, threshold = 0.06)
names(g13)
g14 <- score(res11, xax = 2, threshold = 0.06)
###### row=F / col=T
res12 <- ade4::inertia(coa1, row = FALSE, col = TRUE, nf = 2)
res12$col.abs
idx <- which(res12$col.abs[, 1]/100 >= 0.1 | res12$col.abs[, 2]/100 >= 0.1)
rownames(res12$col.abs[idx, ])
coa1$co[idx, ]
g15 <- plot(res12)
g16 <- score(res12, threshold = 0.08)
g17 <- score(res12, threshold = 0.07)
########################################
########################################
# Second example
data(housetasks, package = "ade4")
coa2 <- ade4::dudi.coa(housetasks, scann = FALSE)
###### row=T / col=F
res21 <- ade4::inertia(coa2, row = TRUE, col = FALSE)
g21 <- plot(res21)
g22 <- score(res21)
g23 <- score(res21, xax = 2)
###### row=F / col=T
res22 <- ade4::inertia(coa2, row = FALSE, col = TRUE)
g24 <- plot(res22, plabels.cex = 2)
names(g24)
g25 <- plot(res22, posieig = "topleft")
names(g25)
g26 <- plot(res22, heavy_col.plabels.box.draw = TRUE,
light_col.ppoints.col = "purple")
g27 <- plot(res22, type = "both")
g28 <- plot(res22, type = "ellipse", ellipseSize = 3, plabels.col = "black",
pellipse.col = "purple", pellipses.border = "black")
}
\keyword{hplot}
\keyword{methods}
adegraphics/man/S2.traject-class.Rd 0000644 0001762 0000144 00000007105 13742303021 016606 0 ustar ligges users \name{S2.traject-class}
\docType{class}
\alias{S2.traject}
\alias{S2.traject-class}
\alias{prepare,S2.traject-method}
\alias{panel,S2.traject-method}
\title{Class \code{S2.traject}}
\description{
A class for the creation of a bi-dimensional plot with trajectories linking the points.
}
\section{Objects from the Class}{
\code{S2.traject} objects can be created by calls of the form \code{new("S2.traject", ...)}.
The regular usage in this package is to use the \code{s.traject} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
\item{\code{fac}: a factor (or a matrix of factors) splitting the rows of \code{dfxy}.}
\item{\code{labels}: a vector of character strings containing the trajectories' labels.}
\item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
\item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
The specific slots for \code{S2.traject} objects are: \itemize{
\item{\code{order}: a vector containing the drawing order of the trajectories. A vector of length equal to factor.}
\item{\code{col}: a \code{NULL} value, a color or a colors vector to color points, labels and lines.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S2}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S2.traject} are:
\describe{
\item{prepare}{\code{signature(object = "S2.traject")}:
calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "S2.traject")}:
draws points, arrows and labels.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S2}}
\code{\link{s.traject}}
}
\examples{
showClass("S2.traject")
}
\keyword{classes}
adegraphics/man/triangle.label.Rd 0000644 0001762 0000144 00000006371 13742303021 016453 0 ustar ligges users \name{triangle.label}
\alias{triangle.label}
\title{Ternary plot with labels}
\description{
This function represents a three dimensional scatter plot with labels.
}
\usage{
triangle.label(dfxyz, labels = rownames(dfxyz), adjust = TRUE, min3d = NULL,
max3d = NULL, addaxes = FALSE, addmean = FALSE, meanpar = NULL, axespar = NULL,
showposition = TRUE, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE,
pos = -1, ...)
}
\arguments{
\item{dfxyz}{a three columns data frame used to produce the plot}
\item{labels}{a character vector containing labels for points}
\item{adjust}{a logical to adjust the device with the limits of the smaller equilateral triangle containing the values}
\item{min3d}{a vector of three values for triangular minimal limits}
\item{max3d}{a vector of three values for triangular maximal limits}
\item{addaxes}{a logical to draw the principal axes}
\item{addmean}{a logical to plot the mean}
\item{meanpar}{a list to represent mean points using \code{pch}, \code{cex} and \code{col}}
\item{axespar}{a list to represent axes lines using \code{col}, \code{lwd} and \code{lty}}
\item{showposition}{a logical indicating whether the used triangle should be shown in the complete one}
\item{facets}{a factor splitting the rows of \code{dfxyz} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{Tr.label}) or \code{ADEgS} (if \code{showposition} is TRUE,
if \code{add} is \code{TRUE} and/or if facets are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{Tr.label}}
\code{\linkS4class{ADEg.Tr}}
}
\examples{
data(euro123, package = "ade4")
df <- rbind.data.frame(euro123$in78, euro123$in86, euro123$in97)
row.names(df) <- paste(row.names(euro123$in78), rep(c(1, 2, 3), rep(12, 3)), sep = "")
g1 <- triangle.label(df, label = row.names(df), showposition = TRUE, plot = FALSE)
g2 <- triangle.label(euro123$in78, plabels.cex = 0, ppoints.cex = 2, addmean = TRUE,
show = FALSE, plot = FALSE)
g3 <- triangle.label(euro123$in86, labels = row.names(euro123$in78), plabels.cex = 0.8,
plot = FALSE)
g4 <- triangle.label(rbind.data.frame(euro123$in78, euro123$in86), plabels.cex = 0.8,
addaxes = TRUE, psub.te = "Principal axis", psub.cex = 1.5, psub.pos = "topright", plot = FALSE)
G <- ADEgS(c(g1, g2, g3, g4), layout = c(2, 2))
}
\keyword{hplot}
\keyword{aplot}
adegraphics/man/Tr.class-class.Rd 0000644 0001762 0000144 00000010742 13742303021 016361 0 ustar ligges users \name{Tr.class-class}
\docType{class}
\alias{Tr.class}
\alias{Tr.class-class}
\alias{prepare,Tr.class-method}
\alias{panel,Tr.class-method}
\title{Class \code{Tr.class}}
\description{
A class for group representation in triangular plot.
}
\section{Objects from the Class}{
\code{Tr.class} objects can be created by calls of the form \code{new("Tr.class", ...)}.
The regular usage in this package is to use the \code{triangle.class} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxyz}: the displayed values in the form of a data frame with three columns, a name or a matching call.}
\item{\code{fac}: a factor partitionning the rows of \code{dfxyz}.}
\item{\code{wt}: a vector of weights for \code{fac}.}
\item{\code{labels}: a vector containing the class' labels.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.Tr} class.
The specific slots for \code{Tr.class} objects are: \itemize{
\item{\code{ellipseSize}: a positive number for ellipse size.}
\item{\code{starSize}: a number between 0 and 1 for star size.}
\item{\code{chullSize}: \code{NULL} or a vector of numbers between 0 and 1 for the convex hulls.}
\item{\code{col}: a \code{NULL} value, a color or a colors vector to color points, ellipses, labels, lines and polygons.}
\item{\code{max3d} and \code{min3d}: vectors of three values for triangular maximal and minimal limits.}
\item{\code{adjust}: a logical to adjust the device with the limits of the smaller equilateral triangle containing the values.}
}}
\item{\code{stats}}{a list of internal preliminary calculations.
The specific slots for \code{S2.class} objects are: \itemize{
\item{\code{means}: a matrix containing the weighted mean calculated for each \code{fac} value.}
\item{\code{mean2d}: a matrix containing the weighted mean calculated for each \code{fac} value on two-dimension.}
\item{\code{covvar}: a list containing the weighted variance-covariance matrices calculated for each \code{fac} value.}
\item{\code{covvar2d}: a list containing the weighted variance-covariance matrices calculated for each \code{fac} value on two-dimension.}
}}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{ellipses}: ellipses' coordinates.}
\item{\code{chullcoord}: convex hulls' coordinates.}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.Tr}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.Tr}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.Tr}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.Tr}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.Tr"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{Tr.class} are:
\describe{
\item{prepare}{\code{signature(object = "Tr.class")}:
calls the parent method (\code{prepare} for \code{ADEg.Tr}), modifies some graphical parameters used by
default and calculates ellipses, convex hulls and centroids.}
\item{panel}{\code{signature(object = "Tr.class")}:
draws arrows, labels and points.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.Tr}}
\code{\link{triangle.class}}
}
\examples{
showClass("Tr.class")
}
\keyword{classes}
adegraphics/man/addtext.Rd 0000644 0001762 0000144 00000004101 13742303021 015212 0 ustar ligges users \name{addtext}
\alias{addtext}
\alias{addtext-methods}
\alias{addtext,ADEg-method}
\alias{addtext,ADEgS-method}
\alias{addtext,trellis-method}
\title{
Adds labels on graphics.
}
\description{
Adds a \code{trellis} object containing one or several labels on one or several graphical objects.
}
\usage{
addtext(object, xcoord, ycoord, label, plot = TRUE, ...)
}
\arguments{
\item{object}{an object of class \code{ADEg}, \code{trellis} or \code{ADEgS}
}
\item{xcoord}{an integer (or a vector) indicating where \code{label} is(are) plotted on the x-axis,
passed to the \code{adeg.panel.label}
}
\item{ycoord}{an integer (or a vector) indicating where \code{label} is(are) plotted on the y-axis,
passed to the \code{adeg.panel.label}
}
\item{label}{a character string (or a vector) containing the label(s) displayed on \code{object}
}
\item{plot}{a logical indicating if the graphics is displayed
}
\item{\dots}{Other arguments. Additional graphical parameters (see the \code{plabels} list in
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}}).
If \code{object} is an \code{ADEgS}, the argument \code{which} identify which
\code{ADEg} is/are used for superposition.
}
}
\value{
An object of class \code{ADEgS}.
}
\author{Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEgS}}
\code{adeg.panel.label}
}
\examples{
data(dunedata, package = "ade4")
afc1 <- ade4::dudi.coa(dunedata$veg, scannf = FALSE)
g1 <- table.value(dunedata$veg, symbol = "circle", ppoints.cex = 0.5, plot = FALSE)
addtext(g1, 1, 20, "A", plabels.srt = 45, plabels.box.draw = FALSE, plabels.col = "red")
xy <- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -1, 1))
posi <- factor(xy$x > 0) : factor(xy$y > 0)
g2 <- s.class(xy, fac = posi, facets = posi, pellipses.col = 1:4, plabels.cex = 0,
plegend.drawKey = FALSE, psub.cex = 0, plot = FALSE)
addtext(g2, c(0.5, 0.5, -0.5, -0.5), c(0.5, -0.5), levels(posi), plabels.cex = 2, plabels.col = 1:4)
}
\keyword{aplot}
adegraphics/man/adeg.panel.values.Rd 0000644 0001762 0000144 00000006115 13742303021 017060 0 ustar ligges users \name{adeg.panel.values}
\alias{adeg.panel.values}
\title{Panel function drawing a third variable into a two-dimensional scatterplot}
\description{
Panel function for drawing coordinates with variable representation.
The values can be represented through symbols with proportional size or various colors.
}
\usage{
adeg.panel.values(x, y, z, method, symbol, ppoints, breaks, centerpar = NULL,
center = 0)
}
\arguments{
\item{x}{a numeric vector, x-coordinates for the symbols}
\item{y}{a numeric vector, y-coordinates for the symbols}
\item{z}{a numeric vector, the third variable with one value per coordinates (x, y)}
\item{method}{a character string equal to \code{color} or \code{size}.\cr
If \code{color}, a palette of color is used for the symbols (one color per interval defined by \code{breaks}).\cr
If \code{size}, symbols' area is proportional to the value. Area is 0 for values equals to \code{center}.
Two colors are used, one for values smaller than center and the other for values larger than center.}
\item{symbol}{a character string equal to \code{square} or \code{circle}.}
\item{ppoints}{a list of parameters as an extract of \code{adegpar("ppoints")}, used for points' drawing.
\itemize{
\item{\code{alpha}: transparency of points}
\item{\code{cex}: size of points}
\item{\code{col}: border color of points}
\item{\code{pch}: symbol to use}
\item{\code{fill}: filling color}
}}
\item{breaks}{a vector, the breaks used for splitting \code{z} if \code{method} is \code{color}}
\item{centerpar}{a list to represent center value using elements in the \code{adegpar("ppoints")} list or \code{NULL} value.
If the method is \code{size}, z-values equals to \code{center} have a size of zero.
If \code{centerpar} is not \code{NULL}, those z-values are shown as points with the \code{centerpar} drawing parameters.}
\item{center}{a center value for method \code{size}}
}
\value{
Draws the points.
}
\references{
Tanimura, S. and Kuroiwa, C. and Mizota, T. 2006 Proportional symbol
mapping in R \emph{Journal of Statistical Software} \bold{15}, 1--7
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\note{
For more information about the use of panel functions, please see the \code{lattice} package developed by Deepayan Sarkar.
For the symbols size, the method is \code{size} uses perceptual scaling (Tanimura et al. 2006).
}
\examples{
if(require(lattice, quietly = TRUE)) {
param <- adegpar("ppoints")[[1]]
param$col <- adegpar("ppalette")[[1L]]$quanti(2)
z <- rnorm(10)
xyplot(1:10 ~ 1:10, panel = function(x, y, ...){
adeg.panel.values(x, y, z, method = "size", symbol = "square", ppoints =
param, breaks = pretty(z, 4))})
}
if(require(lattice, quietly = TRUE)) {
param$col <- adegpar()$ppalette$quali((length(pretty(z, 2)) - 1))
xyplot(1:10 ~ 1:10, panel = function(x, y, ...){
adeg.panel.values(x, y, z, method = "color", symbol = "circle",
ppoints = param, breaks = pretty(z, 2))})
}
}
\keyword{aplot}
adegraphics/man/s1d.class.Rd 0000644 0001762 0000144 00000006335 13742303021 015363 0 ustar ligges users \name{s1d.class}
\alias{s1d.class}
\title{1-D plot of a numeric score partitioned in classes (levels of a factor)}
\description{
This function represents the link between scores values and their matching labeled classes.
}
\usage{
s1d.class(score, fac, wt = rep(1, NROW(fac)), labels = levels(fac), at = 0.5,
poslabel = c("regular", "value"), col = NULL, facets = NULL, plot = TRUE,
storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{score}{a numeric vector (or a data frame) used to produce the plot}
\item{fac}{a factor (or a matrix of factors) to split \code{score}}
\item{wt}{a vector of weights for \code{score}}
\item{labels}{the labels' names drawn for each class}
\item{at}{a numeric vector used as an index}
\item{poslabel}{the label position of each class (each level of \code{fac}), it can be \code{regular} or \code{value}.
If \code{regular}, labels are evenly spaced.
If \code{value}, labels are placed on the weighted mean of their class.}
\item{col}{a color or a colors vector for points, labels and lines according to their factor level.
Colors are recycled whether there are not one color by factor level.}
\item{facets}{a factor splitting \code{score} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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
\code{storeData} is \code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
The weighted means of class are available in the object slot \code{stats} using \code{object@stats$means}.
Graphical parameters for rugs are available in \code{plines} of \code{adegpar}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\value{
An object of class \code{ADEg} (subclass \code{S1.class}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or data frame for \code{score} or data frame for \code{fac} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S1.class}}
\code{\linkS4class{ADEg.S1}}
}
\examples{
data(meau, package = "ade4")
envpca <- ade4::dudi.pca(meau$env, scannf = FALSE)
g1 <- s1d.class(envpca$li[, 1], meau$design$season, poslabel = "value", col = 1:4, plot = FALSE)
g2 <- s1d.class(envpca$li[, 1], meau$design$season, poslabel = "regular", col = 1:6,
p1d.reverse = TRUE, plot = FALSE)
ADEgS(c(g1, g2), layout = c(2, 1))
g3 <- s1d.class(envpca$li[, 1], meau$design$season, poslabel = "value", col = 1:4,
plabels.cex = 0, key = list(space = "bottom"))
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/T.cont-class.Rd 0000644 0001762 0000144 00000006725 13742303021 016043 0 ustar ligges users \name{T.cont-class}
\docType{class}
\alias{T.cont}
\alias{T.cont-class}
\alias{panel,T.cont-method}
\title{Class \code{T.cont}}
\description{
A class for the representation of a contingency table object with statistical information (mean and regression lines).
}
\section{Objects from the Class}{
\code{T.cont} objects can be created by calls of the form \code{new("T.cont", ...)}.
The regular usage in this package is to use the \code{table.value} function with a \code{table} object.
}
\section{Slots}{
\describe{
\item{\code{data}:}{a list containing data or data's name. \itemize{
\item{\code{dftab}: a contingency table object in the form of a data frame, a name or a matching call}
\item{\code{coordsx}: an integer or a vector indicating the columns of \code{dftab} kept}
\item{\code{coordsy}: an integer or a vector indicating the rows of \code{dftab} kept}
\item{\code{labelsx}: the columns' labels}
\item{\code{labelsy}: the rows' labels}
\item{"\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{T.value} class.
The specific slots for \code{T.cont} objects are: \itemize{
\item{\code{meanX}: a logical to represent columns' means by points.}
\item{\code{meanY}: a logical to represent rows' means by points.}
\item{\code{ablineX}: a logical to represent columns' regression lines.}
\item{\code{ablineY}: a logical to represent columns' regression lines.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{T.value}}, directly.\cr
Class \code{\linkS4class{ADEg.T}}, by class \code{T.value}, distance 2.\cr
Class \code{\linkS4class{ADEg}}, by class \code{T.value}, distance 3.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{T.value}, distance 4.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{T.value}, distance 4.
}
\section{Methods}{
The methods of the father classes \code{"T.value"}, \code{"ADEg.T"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{T.cont} are:
\describe{
\item{panel}{\code{signature(object = "T.cont")}:
draws mean points and regression lines.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.T}}
\code{\linkS4class{T.value}}
\code{\link{table.value}}
}
\examples{
showClass("T.cont")
}
\keyword{classes}
adegraphics/man/s.value.Rd 0000644 0001762 0000144 00000010655 13742303021 015145 0 ustar ligges users \name{s.value}
\alias{s.value}
\title{2-D scatter plot with proportional symbols (bubble plot)}
\description{
This function represents a two dimensional scatter plot with a third value represented by symbols.
}
\usage{
s.value(dfxy, z, breaks = NULL, xax = 1, yax = 2, method = c("size",
"color"), symbol = c("square", "circle", "diamond", "uptriangle", "downtriangle"),
col = NULL, nclass = 4, center = 0, centerpar = NULL, facets = NULL,
plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dfxy}{a data frame used to produce the plot}
\item{z}{a vector (or a matrix) with as many values as rows in \code{dfxy}}
\item{breaks}{a vector containing the breaks used for splitting \code{z} value. If \code{NULL}, \code{pretty(z, n)} is used.}
\item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
\item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
\item{method}{\code{color} or \code{size} value for represent \code{z}.
If \code{color}, a palette of color is used for the symbols (one color per interval).
If \code{size}, symbols of proportional area are used. Area is 0 for values
equals to center (default 0). Two colors are used, for values less than center and larger than center.}
\item{symbol}{value for symbol type}
\item{col}{a color or a colors vector to color symbols.
If \code{method} is \code{size}, a 2-length vector of color is expected.
If \code{method} is \code{color}, it must have as many colors as the number of class.}
\item{nclass}{an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
\item{center}{a center value for method \code{size}}
\item{centerpar}{a logical or a list to represent center value using elements in the
\code{adegpar("ppoints")} list}
\item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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
\code{storeData} is \code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{S2.value}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or multidimensional \code{z} or vectors for \code{xax}/\code{yax} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\note{
For the symbol size, if the method is \code{size}, we use perceptual scaling (Tanimura et al. 2006) .
}
\references{
Tanimura, S. and Kuroiwa, C. and Mizota, T. 2006 Proportional symbol
mapping in R \emph{Journal of Statistical Software} \bold{15}, 1--7
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S2.value}}
\code{\linkS4class{ADEg.S2}}
}
\examples{
data(rpjdl, package = "ade4")
fau.coa <- ade4::dudi.coa(rpjdl$fau, scan = FALSE, nf = 3)
g1 <- s.value(fau.coa$li, fau.coa$li[,3])
update(g1, key = list(space = "right", columns = 1))
g2 <- s.value(fau.coa$li, fau.coa$li[,3], method = "color", plegend.size = 0.8)
g3 <- s.value(fau.coa$li, fau.coa$li[,3], plegend.size = 0.8, symbol = "square",
method = "color", col = colorRampPalette(c("yellow", "blue"))(6))
g4 <- s.value(fau.coa$li, fau.coa$li[,3], plot = FALSE)
g5 <- s.value(fau.coa$li, fau.coa$li[, 3], center = 0, method = "size",
symbol = "circle", col = c("yellow", "red"), plot = FALSE)
g6 <- ADEgS(c(g4, g5), positions = layout2position(matrix(c(1, 2), 1, 2)),
add = matrix(0, ncol = 2, nrow = 2))
data(irishdata, package = "ade4")
irq0 <- data.frame(scale(irishdata$tab, scale = TRUE))
g7 <- s.value(irishdata$xy.utm, irq0, Sp = irishdata$Spatial.contour, paxes.draw = FALSE,
pgrid.draw = FALSE, pSp.alpha = 0.4)
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/s.logo.Rd 0000644 0001762 0000144 00000005264 13742303021 014771 0 ustar ligges users \name{s.logo}
\alias{s.logo}
\title{2-D scatter plot with logos (bitmap objects)}
\description{
This function represents a two dimensional scatter plot associating logos with points.
}
\usage{
s.logo(dfxy, logos, xax = 1, yax = 2, facets = NULL,
plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dfxy}{a data frame used to produce the plot}
\item{logos}{a list containing the picture to use for each point}
\item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
\item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
\item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{S2.logo}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or vectors for \code{xax}/\code{yax} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S2.logo}}
\code{\linkS4class{ADEg.S2}}
}
\examples{
data(ggtortoises, package = "ade4")
g1 <- s.logo(ggtortoises$pop,
ggtortoises$ico[as.character(ggtortoises$pop$carap)],
pori.incl = FALSE, ppoints.cex = 0.5)
g1 <- s.label(ggtortoises$pop, add = TRUE, plabels.boxes.alpha = 0)
g2 <- s.label(ggtortoises$misc, pgrid.draw = FALSE,
porigin.include = FALSE, paxes.draw = FALSE,
Sp = ggtortoises$Spatial, pback.col = "lightblue", pSp.col = "white")
g2 <- s.logo(ggtortoises$pop, ggtortoises$ico[as.character(ggtortoises$pop$carap)],
ppoints.cex = 0.5, add = TRUE)
data(capitales, package = "ade4")
g3 <- s.logo(capitales$xy[sort(rownames(capitales$xy)), ], capitales$logo,
Sp = capitales$Spatial, pback.col = "lightblue", pSp.col = "white",
pgrid.draw = FALSE)
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/adeg.panel.label.Rd 0000644 0001762 0000144 00000005031 13742303021 016634 0 ustar ligges users \name{adeg.panel.label}
\alias{adeg.panel.label}
\title{Panel function for adding labels.}
\description{
Panel function for drawing labels into a \code{trellis} graphic (\code{lattice}
package) with or without boxes around labels.
}
\usage{
adeg.panel.label(x, y, labels, plabels, pos = NULL)
}
\arguments{
\item{x}{a numeric vector, x-coordinates for the labels}
\item{y}{a numeric vector, y-coordinates for the labels}
\item{labels}{a vector of character string, the labels}
\item{plabels}{
a list of parameters as an extract of \code{adegpar("plabels")}, used for labels' drawing.
Each value can be a vector and will be recycled if necessary:
\itemize{
\item{\code{alpha}, \code{cex}, \code{col}: drawing parameters for the text}
\item{\code{srt}: orientation of the labels, \code{horizontal}, \code{vertical} or an angle indication (in degrees).
Boxes are not rotated. If the orientation is not near to \code{horizontal}/\code{vertical} (0/90), it is best not to draw the boxes}
\item{\code{optim}: logical. If TRUE, uses an algorithm trying to avoid labels' overlapping and outside limits}
\item{\code{boxes}: concerns the label's boxes. a list: \itemize{
\item{\code{draw}: logical. If TRUE, labels are framed}
\item{\code{alpha}, \code{border}, \code{col}, \code{lwd}, \code{lty}: rule transparency, border lines and background color}
}}}}
\item{pos}{a position specifier for the text, used in panel.text.
Values of \code{1}, \code{2}, \code{3} and \code{4} respectively indicate positions below, to the left of,
above and to the right of the specified coordinates.}
}
\value{
Draws the labels.
}
\references{
The algorithm used for labels positions optimization is inspired by the \code{pointLabel}
function of the \code{maptools} package developed by Tom Short.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{\link[maptools]{pointLabel}}
\note{
For more information about the use of panel functions, please see the \code{lattice} package developed by Deepayan Sarkar.
}
\examples{
if(require(lattice, quietly = TRUE)) {
param <- adegpar("plabels")[[1]]
xyplot(1:10 ~ 1:10, panel = function(x, y, ...){
adeg.panel.label(x, y, LETTERS[1:10], plabels = param)})
}
if(require(lattice, quietly = TRUE)) {
param$boxes$draw <- FALSE
param$col <- "blue"
xyplot(1:10 ~ 1:10, panel = function(x, y, ...){
adeg.panel.label(x, y, LETTERS[1:10], plabels = param)})
}
}
\keyword{aplot}
adegraphics/man/s1d.curve.Rd 0000644 0001762 0000144 00000004117 13742303021 015376 0 ustar ligges users \name{s1d.curve}
\alias{s1d.curve}
\title{1-D plot of a numeric score linked by curves}
\description{
This function represents a score using points linked by curves.
}
\usage{
s1d.curve(score, at = 1:NROW(score), facets = NULL, plot = TRUE,
storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{score}{a numeric vector (or a data frame) used to produce the plot}
\item{at}{a numeric vector used as an index}
\item{facets}{a factor splitting \code{score} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Graphical parameters for lines and points are available in \code{plines} and in \code{ppoints} of \code{adegpar}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\value{
An object of class \code{ADEg} (subclass \code{C1.curve}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or data frame for \code{score} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{C1.curve}}
\code{\linkS4class{ADEg.C1}}
}
\examples{
data(rpjdl, package = "ade4")
rpjdl.coa <- ade4::dudi.coa(rpjdl$fau, scannf = FALSE, nf = 4)
s1d.curve(rpjdl.coa$eig)
set.seed(40)
score1 <- rnorm(10)
s1d.curve(score1)
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/S2.density-class.Rd 0000644 0001762 0000144 00000010062 13742303021 016625 0 ustar ligges users \name{S2.density-class}
\docType{class}
\alias{S2.density}
\alias{S2.density-class}
\alias{prepare,S2.density-method}
\alias{panel,S2.density-method}
\title{Class \code{S2.density}}
\description{
A class for the creation and display of bi-dimensional plot with density estimation.
}
\section{Objects from the Class}{
\code{S2.density} objects can be created by calls of the form \code{new("S2.density", ...)}.
The regular usage in this package is to use the \code{s.density} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
\item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
\item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
The specific slots for \code{S2.density} objects are: \itemize{
\item{\code{bandwidth}: bandwidth for density calculations which is passed in parameters in the \code{bkde2D} function of the \code{KernSmooth} package.}
\item{\code{gridsize}: grid dimension.}
\item{\code{threshold}: a value between 0 and 1 to draw densities greater than this threshold. No density is visible whether it is equal to 1.}
\item{\code{col}: a \code{NULL} value, a color or a colors vector to color densities.}
\item{\code{nrpoints}: number of points on the density image.}
\item{\code{contour}: a logical to draw contour lines.}
\item{\code{region}: a logical to fill grid regions with \code{col}.}
\item{\code{nclass}: number of class for density.}
}}
\item{\code{stats}}{a list of internal preliminary calculations.
The specific slot for \code{S2.density} objects is: \itemize{
\item{\code{densit}: a list containing the results of the \code{bkde2D} function.}
}}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S2}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S2.density} are:
\describe{
\item{prepare}{\code{signature(object = "S2.density")}:
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates densities.}
\item{panel}{\code{signature(object = "S2.density")}:
draws densities and external points.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S2}}
\code{\link{s.density}}
}
\examples{
showClass("S2.density")
}
\keyword{classes}
adegraphics/man/adegraphics-package.Rd 0000644 0001762 0000144 00000005744 13742303021 017436 0 ustar ligges users \name{adegraphics-package}
\alias{adegraphics-package}
\alias{adegraphics}
\docType{package}
\title{Graphical objects for ade4 functions (and more)}
\description{
This package was created to replace graphics functionalities of the
\code{ade4} package and to offer customizable representations of data
and result analysis.
Graphics are objects of S4 class, which can be displayed but also stored for
latter modifications.
Those modifications can be graphical changes, but also superposition
or juxtaposition of various graphical objects (creating an other type of object).
Each object will contain graphical parameters and instructions for the
display (calls, positions, etc.) and the data set used.
Sometimes data is heavy, due to its size for example. Two storing
systems exist:
\itemize{
\item{full storage: data is assigned to an object's slot.}
\item{names and position: data names (as a string, obtained using
\code{deparse(substitute)}) and their frame position (using
\code{sys.nframe()}) are stored. Then the full data can be
retrieve with those two informations (and only if the data objects
are still in the environment)}
}
This new system is based on the \code{lattice} package and \code{grid} graphics.
}
\details{
\tabular{ll}{
Package: \tab adegraphics\cr
Type: \tab Package\cr
Version: \tab 1.0-12\cr
Date: \tab 2018-08-31\cr
License: \tab GPL (>=2)\cr
Depends: \tab ade4 (>= 1.7-13), graphics, grid, KernSmooth, lattice, latticeExtra, methods, RColorBrewer, sp (>= 1.1-1), stats
}
A lot of classes were implemented.
Two superclass structures the architecture in class.
Simple and complex graphics are distinguished in the former version:
\itemize{
\item{\code{ADEg} class provides simple graphics using one kind of data
(most of a time, only a data frame) and one representation method
(points, labels, arrows...)}
\item{\code{ADEgS} class provides complex graphics making juxtaposition,
superposition and/or insertion of several simple graphics.}
}
5 subclasses inherits from the superclass abstract \code{ADEg}:
\itemize{
\item{\code{ADEg.S1}: one-dimensional plot}
\item{\code{ADEg.S2}: bi-dimensional plot}
\item{\code{ADEg.C1}: one-dimensional data plotted in 2-D}
\item{\code{ADEg.T}: table plot}
\item{\code{ADEg.Tr}: triangle plot}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\references{
Aurélie Siberchicot, Alice Julien-Laferrière, Anne-Béatrice Dufour, Jean Thioulouse and Stéphane Dray (2017). adegraphics: An S4
Lattice-Based Package for the Representation of Multivariate Data. The R Journal. 9:2. 198--212.
https://journal.r-project.org/archive/2017/RJ-2017-042/index.html
}
\keyword{package}
\seealso{
\code{\link[lattice:lattice-package]{lattice}}
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEgS}}
}
\examples{
showClass("ADEg")
showClass("ADEgS")
}
adegraphics/man/S1.class-class.Rd 0000644 0001762 0000144 00000007365 13742303021 016266 0 ustar ligges users \name{S1.class-class}
\docType{class}
\alias{S1.class}
\alias{S1.class-class}
\alias{prepare,S1.class-method}
\alias{panel,S1.class-method}
\title{Class \code{S1.class}}
\description{
A class for the creation and display of a numeric score aggregated in class by an associated factor.
}
\section{Objects from the Class}{
\code{S1.class} objects can be created by calls of the form \code{new("S1.class", ...)}.
The regular usage in this package is to use the \code{s1d.class} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
\item{\code{fac}: a factor for \code{score} splitting in the form of a vector, a factor, a name or a matching call.}
\item{\code{wt}: a vector of weights for \code{score}}
\item{\code{labels}: the labels' names drawn for each class.}
\item{\code{at}: the index value.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S1} class.
The specific slots for \code{S1.class} objects are: \itemize{
\item{\code{col}: a \code{NULL} value, a color or a colors vector to color points, labels and lines.}
\item{\code{poslabel}: the label position of each class, it can be \code{regular} or \code{value}.}
}}
\item{\code{stats}}{a list of internal preliminary calculations.
The specific slot for \code{S1.class} objects is: \itemize{
\item{\code{means}: the weighted mean calculated for each \code{fac} value.}
}}
\item{\code{s.misc}}{a list of some others internal parameters.
The specific slot for \code{S1.class} objects is: \itemize{
\item{\code{rug}: an index value indicating where the rugs are drawn.}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S1}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S1}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S1}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S1}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S1"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S1.class} are:
\describe{
\item{prepare}{\code{signature(object = "S1.class")}:
calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "S1.class")}:
draws labels and lines matching with score values.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S1}}
\code{\link{s1d.class}}
}
\examples{
showClass("S1.class")
}
\keyword{classes}
adegraphics/man/s1d.curves.Rd 0000644 0001762 0000144 00000003660 13742303021 015563 0 ustar ligges users \name{s1d.curves}
\alias{s1d.curves}
\title{1-D plot of multiple scores linked by curves}
\description{
This function represents multiple scores using points linked by curves.
}
\usage{
s1d.curves(score, at = 1:NROW(score), facets = NULL, plot = TRUE,
storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{score}{a numeric matrix (or a data frame) used to produce the plot}
\item{at}{a numeric vector used as an index}
\item{facets}{a factor splitting \code{score} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Graphical parameters for lines and points are available in \code{plines} and in \code{ppoints} of \code{adegpar}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\value{
An object of class \code{ADEg} (subclass \code{C1.curves}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{C1.curves}}
\code{\linkS4class{ADEg.C1}}
}
\examples{
scores <- matrix(1:50, nrow = 10)
s1d.curves(scores)
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/S2.value-class.Rd 0000644 0001762 0000144 00000011027 13742303021 016264 0 ustar ligges users \name{S2.value-class}
\docType{class}
\alias{S2.value}
\alias{S2.value-class}
\alias{prepare,S2.value-method}
\alias{panel,S2.value-method}
\title{Class \code{S2.value}}
\description{
A class for the creation and display of bi-dimensional plot with a third value represented (as a variable) by symbols.
}
\section{Objects from the Class}{
\code{S2.value} objects can be created by calls of the form \code{new("S2.value", ...)}.
The regular usage in this package is to use the \code{s.value} function.
}
\section{Slots}{
\describe{
\item{\code{data}:}{a list containing data or data's name. \itemize{
\item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
\item{\code{z}: a vector (or a matrix) with as many values as rows in \code{dfxy}.}
\item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
\item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
The specific slots for \code{S2.value} objects are: \itemize{
\item{\code{method}: the method of representation for \code{z} (color shading or proportional size).}
\item{\code{symbol}: the type of symbol (square or circle).}
\item{\code{center}: a center value for method \code{size}.}
\item{\code{centerpar}: a logical or a list to represent center value using elements in the
\code{adegpar("ppoints")} list.}
\item{\code{breaks}: a vector containing the breaks used for splitting \code{z} value. If \code{NULL}, \code{pretty(z, n)} is used.}
\item{\code{nclass}: an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
\item{\code{col}: a \code{NULL} value, a color or a colors vector to color symbols.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{plegend.update}: a logical indicating if the legend parameters are updating}
\item{\code{breaks.update}: a logical indicating if the legend breaks are updating}
\item{\code{lim.update}: a logical indicating if the limits are updating}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S2}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S2.value} are:
\describe{
\item{prepare}{\code{signature(object = "S2.value")}:
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates limits.}
\item{panel}{\code{signature(object = "S2.value")}:
draws symbols.}
}
}
\note{
For the symbol size, if the method is \code{size}, we use perceptual scaling (Tanimura et al. 2006).
}
\references{
Tanimura, S. and Kuroiwa, C. and Mizota, T. 2006. Proportional symbol
mapping in R. \emph{Journal of Statistical Software}. \bold{15}, 1--7
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S2}}
\code{\link{s.value}}
}
\examples{
showClass("S2.value")
}
\keyword{classes}
adegraphics/man/add.ADEg.Rd 0000644 0001762 0000144 00000002241 13742303021 015047 0 ustar ligges users \name{add.ADEg}
\alias{add.ADEg}
\alias{add.ADEg-methods}
\title{Superpose an new \code{ADEg} graph to the previous ones plotted}
\description{
Adds an \code{ADEg} to the current \code{ADEg} or \code{ADEgS} plot.
}
\usage{
add.ADEg(object)
}
\arguments{
\item{object}{an \code{ADEg} object}
}
\details{
This function uses the last plotted \code{ADEg} or \code{ADEgS} object.\cr
It calls \code{\link{superpose}}.
}
\value{
an \code{ADEgS} object
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\link{superpose}}
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEgS}}
}
\examples{
df1 <- cbind(rnorm(24), rnorm(24))
df2 <- cbind(rnorm(24), rnorm(24))
g1 <- s.label(df1, ppoints.col = "blue")
g2 <- s.label(df2, ppoints.col = "red", plot = FALSE)
add.ADEg(g2)
data(jv73, package = "ade4")
pca1 <- ade4::dudi.pca(jv73$morpho, scannf = FALSE)
g5 <- s.label(pca1$li, plabels.optim = TRUE)
g6 <- s.class(pca1$li, jv73$fac.riv, starSize = 0, ellipseSize = 0, chullSize = 1,
ppolygons.alpha = 0.4, col = rainbow(12), ppoints.cex = 0, plot = FALSE)
add.ADEg(g6)
}
\keyword{aplot}
adegraphics/man/T.image-class.Rd 0000644 0001762 0000144 00000007302 13742303021 016152 0 ustar ligges users \name{T.image-class}
\docType{class}
\alias{T.image}
\alias{T.image-class}
\alias{prepare,T.image-method}
\alias{panel,T.image-method}
\title{Class \code{T.image}}
\description{
A class for the representation of a matrix or table object in which values have different colors.
}
\section{Objects from the Class}{
\code{T.image} objects can be created by calls of the form \code{new("T.image", ...)}.
The regular usage in this package is to use the \code{table.image} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dftab}: the displayed values which can be \code{table}, \code{dist} or \code{matrix}
in the form of a data frame, a name or a matching call}
\item{\code{coordsx}: an integer or a vector indicating the columns of \code{dftab} kept}
\item{\code{coordsy}: an integer or a vector indicating the rows of \code{dftab} kept}
\item{\code{labelsx}: columns labels}
\item{\code{labelsy}: rows labels}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.T} class.
The specific slots for \code{T.image} objects are: \itemize{
\item{\code{breaks}: a vector of values to split \code{dftab}. If \code{NULL}, \code{pretty(dftab, nclass)} is used.}
\item{\code{nclass}: an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
\item{\code{col}: a \code{NULL} value, a color or a colors vector used for the cells.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{breaks.update}: a logical indicating if the legend breaks is updating.}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.T}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.T}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.T}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.T}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.T"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{T.image} are:
\describe{
\item{prepare}{\code{signature(object = "T.image")}:
calls the parent method (\code{prepare} for \code{ADEg.T}) and modifies some graphical parameters used by default and calculates limits and grid.}
\item{panel}{\code{signature(object = "T.image")}:
draws raster image.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.T}}
\code{\link{table.image}}
}
\examples{
showClass("T.image")
}
\keyword{classes}
adegraphics/man/S2.distri-class.Rd 0000644 0001762 0000144 00000007677 13742303021 016466 0 ustar ligges users \name{S2.distri-class}
\docType{class}
\alias{S2.distri}
\alias{S2.distri-class}
\alias{prepare,S2.distri-method}
\alias{panel,S2.distri-method}
\title{Class \code{S2.distri}}
\description{
A class for distributions on a numeric score using a mean-standard deviation display.
}
\section{Objects from the Class}{
\code{S2.distri} objects can be created by calls of the form \code{new("S2.distri", ...)}.
The regular usage in this package is to use the \code{s.distri} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
\item{\code{dfdistri}: the mass distribution in which each column is a class.}
\item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
\item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
The specific slots for \code{S2.distri} objects are: \itemize{
\item{\code{ellipseSize}: \code{NULL} or number between 0 and 1 for ellipse size.}
\item{\code{starSize}: \code{NULL} or number between 0 and 1 for star size.}
\item{\code{col}: a \code{NULL} value, a color or a colors vector to color ellipses, labels, lines and polygons.}
}}
\item{\code{stats}}{a list of internal preliminary calculations.
The specific slots for \code{S2.distri} objects are: \itemize{
\item{\code{means}: a matrix containing the weighted mean calculated for each class in\code{dfdistri}.}
\item{\code{covvar}: a list containing the weighted variance-covariance matrices calculated for each class in\code{dfdistri}.}
}}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{ellipses}: ellipses' coordinates.}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S2}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S2.distri} are:
\describe{
\item{prepare}{\code{signature(object = "S2.distri")}:
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates ellipses and centroids.}
\item{panel}{\code{signature(object = "S2.distri")}:
draws ellipses, stars, labels and points.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S2}}
\code{\link{s.distri}}
}
\examples{
showClass("S2.distri")
}
\keyword{classes}
adegraphics/man/Tr.match-class.Rd 0000644 0001762 0000144 00000006406 13742303021 016352 0 ustar ligges users \name{Tr.match-class}
\docType{class}
\alias{Tr.match}
\alias{Tr.match-class}
\alias{prepare,Tr.match-method}
\alias{panel,Tr.match-method}
\title{Class \code{Tr.match}}
\description{
A class for the creation and display of paired coordinates in a triangular plot.
}
\section{Objects from the Class}{
\code{Tr.match} objects can be created by calls of the form \code{new("Tr.match", ...)}.
The regular usage in this package is to use the \code{triangle.match} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxyz}: the displayed values in the form of a three columns data frame, a name or a matching call.}
\item{\code{labels}: a vector of character strings containing the matches' labels.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.Tr} class.
The specific slots for \code{Tr.match} objects are: \itemize{
\item{\code{max3d} and \code{min3d}: vectors of three values for triangular maximal and minimal limits.}
\item{\code{adjust}: a logical to adjust the device with the limits of the smaller equilateral triangle containing the values}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.Tr}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.Tr}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.Tr}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.Tr}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.Tr"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{Tr.match} are:
\describe{
\item{prepare}{\code{signature(object = "Tr.match")}:
calls the parent method (\code{prepare} for \code{ADEg.Tr}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "Tr.match")}:
draws arrows, labels and points.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.Tr}}
\code{\link{triangle.match}}
}
\examples{
showClass("Tr.match")
}
\keyword{classes}
adegraphics/man/table.value.Rd 0000644 0001762 0000144 00000010751 13742303021 015767 0 ustar ligges users \name{table.value}
\alias{table.value}
\title{Heat map-like representation with proportional symbols}
\description{
This function represents a two dimensional table plot with proportional or colored squares or circles for each value.
}
\usage{
table.value(dftab, coordsx = 1:ncol(as.matrix(dftab)), coordsy =
nrow(as.matrix(dftab)):1, labelsx, labelsy, breaks = NULL, method =
c("size", "color"), symbol = c("square", "circle", "diamond",
"uptriangle", "downtriangle"), col = NULL, nclass = 3, center = 0,
centerpar = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dftab}{a data frame, matrix, contingency table or distance matrix used to produce the plot}
\item{coordsx}{an integer or a vector indicating the columns of \code{dftab} kept}
\item{coordsy}{an integer or a vector indicating the rows of \code{dftab} kept}
\item{labelsx}{columns labels}
\item{labelsy}{rows labels}
\item{breaks}{a vector of values to split \code{dftab}. If \code{NULL}, \code{pretty(dftab, nclass)} is used.}
\item{method}{\code{color} or \code{size} value for represent \code{z}.
If \code{color}, a palette of color is used for the symbols (one color per interval).
If \code{size}, symbols of proportional area are used. Area is 0 for values
equals to center (default 0). Two colors are used, for values less than center and larger than center.}
\item{symbol}{value for symbol type}
\item{col}{a color or a colors vector to color symbols.
If \code{method} is \code{size}, a 2-length vector of color is expected.
If \code{method} is \code{color}, it must have as many colors as the number of class}
\item{nclass}{an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
\item{center}{a center value for method \code{size}}
\item{centerpar}{a logical or a list to represent center value using elements in the
\code{adegpar("ppoints")} list}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{T.cont} if \code{dftab} is an \code{table} object,
otherwise subclass \code{T.value}) or \code{ADEgS} (if \code{add} is \code{TRUE}).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\note{
For the symbol size, if the method is \code{size}, we use perceptual scaling (Tanimura et al. 2006) .
}
\references{
Tanimura, S. and Kuroiwa, C. and Mizota, T. 2006 Proportional symbol
mapping in R \emph{Journal of Statistical Software} \bold{15}, 1--7
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{T.value}}
\code{\linkS4class{T.cont}}
\code{\linkS4class{ADEg.T}}
}
\examples{
## data.frame
data(olympic, package = "ade4")
w <- olympic$tab
w <- data.frame(scale(w))
wpca <- ade4::dudi.pca(w, scann = FALSE)
g1 <- table.value(w, ppoints.cex = 0.5, axis.line = list(col = "darkblue"),
axis.text = list(col = "darkgrey"))
# update the legend position
update(g1, key = list(space = "left"))
update(g1, key = list(columns = 1))
g2 <- table.value(w, coordsy = rank(wpca$li[, 1]), ppoints.cex = 0.5,
axis.line = list(col = "darkblue"), axis.text = list(col = "darkgrey"))
g3 <- table.value(w, coordsy = wpca$li[, 1], coordsx = wpca$co[, 1], ppoints.cex = 0.5,
axis.line = list(col = "darkblue"), axis.text = list(col = "darkgrey"))
## distance
data(eurodist)
g5 <- table.value(eurodist, symbol = "circle",
ptable.margin = list(bottom = 5, top = 16, left = 5, right = 16))
\dontrun{
## table
data(rpjdl, package = "ade4")
w <- data.frame(t(rpjdl$fau))
wcoa <- ade4::dudi.coa(w, scann = FALSE)
g6 <- table.value(as.table(as.matrix(w)), meanY = TRUE, coordsx = wcoa$c1[,1],
coordsy = rank(wcoa$l1[,1]), ppoints.cex = 0.2, labelsx = "", col = "black")
}
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/s.distri.Rd 0000644 0001762 0000144 00000005470 13742303021 015326 0 ustar ligges users \name{s.distri}
\alias{s.distri}
\title{2-D scatter plot with means/standard deviations computed using an external table of weights}
\description{
This function represents a two dimensional scatter plot of a frequency distribution.
Class are defined by ellipses and/or stars.
}
\usage{
s.distri(dfxy, dfdistri, xax = 1, yax = 2, starSize = 1,
ellipseSize = 1.5, col = NULL, facets = NULL, plot = TRUE,
storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dfxy}{a data frame used to produce the plot}
\item{dfdistri}{a data frame containing the mass distribution in columns}
\item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
\item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
\item{starSize}{\code{NULL} or number between 0 and 1 for the size of the stars segments joining the stars' center
(centroids) and the matching points}
\item{ellipseSize}{\code{NULL} or number between 0 and 1 for ellipse size}
\item{col}{a color or a colors vector to color points, ellipses, labels, lines and polygons}
\item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{S2.distri}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or vectors for \code{xax}/\code{yax} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S2.distri}}
\code{\linkS4class{ADEg.S2}}
}
\examples{
data(rpjdl, package = "ade4")
xy <- ade4::dudi.coa(rpjdl$fau, scan = FALSE)$li
j <- c(1, 5, 8, 20, 21, 23, 26, 33, 36, 44, 47, 49)
dfdistri <- rpjdl$fau[, j]
coli <- colorRampPalette(c("blue", "red", "orange"))(49)[j]
s.distri(xy, dfdistri, ellipseSize = 1, starSize = 0, porigin.include = FALSE,
pellipses = list(col = coli, alpha = 0.3), plabels.cex = 0)
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/adeg.panel.hist.Rd 0000644 0001762 0000144 00000003413 13742303021 016526 0 ustar ligges users \name{adeg.panel.hist}
\alias{adeg.panel.hist}
\title{Panel function for adding histograms.}
\description{
Panel function for displaying histograms into a \code{trellis} graphic (\code{lattice}
package) and level lines.
}
\usage{
adeg.panel.hist(histValues, horizontal = TRUE, densi, drawLines, params = list(),
identifier = "histogramADEg")
}
\arguments{
\item{histValues}{an object of class histogram. See \code{\link[graphics]{hist}}.}
\item{horizontal}{a logical indicating if the plot is horizontal}
\item{densi}{a list returns by the \code{\link[KernSmooth]{bkde}} containing the coordinates of the binned
kernel density estimate of the probability density of the data}
\item{drawLines}{a vector containing the level values}
\item{params}{graphical parameters : \code{plot.polygon}, \code{add.line} and \code{plot.line} (\code{lattice}) }
\item{identifier}{A character string that is prepended to the name of the grob that is created.}
}
\value{
Displays the histogram and level lines.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\link[KernSmooth]{bkde}} and \code{\link[graphics]{hist}}
}
\note{
For more information about the use of panel functions, please see the \code{lattice} package developed by Deepayan Sarkar.
}
\examples{
if(require(KernSmooth, quietly = TRUE) & require(lattice, quietly = TRUE)) {
z <- round(rnorm(100, 30, 5))
h <- hist(z, plot = FALSE)
d <- bkde(z, kernel = "normal", gridsize = 60)
l <- c(10, 20, 30, 40)
xyplot(1:50 ~ 1:50, histValues = h, densi = d, drawLines = l,
panel = function(drawLines, histValues, densi){
adeg.panel.hist(histValues = histValues, drawLines = drawLines, densi = densi)})
}
}
\keyword{aplot} adegraphics/man/addhist.Rd 0000644 0001762 0000144 00000006041 13742303021 015202 0 ustar ligges users \name{addhist}
\alias{addhist}
\alias{addhist-methods}
\alias{addhist,ADEg.S2-method}
\title{
Adds histograms and density lines against a bi-dimensional graphics.
}
\description{
Adds the two marginal histograms and density lines of each axis against an \code{ADEg.S2} object.
}
\usage{
addhist(object, bandwidth, gridsize = 60, kernel = "normal", cbreaks = 2,
storeData = TRUE, plot = TRUE, pos = -1, ...)
}
\arguments{
\item{object}{an \code{ADEg.S2} object
}
\item{bandwidth}{used for the calculations of the density lines
(see the \code{bkde} function of the \code{KernSmooth} package).
}
\item{gridsize}{used for the calculations of the density lines
(see the \code{bkde} function of the \code{KernSmooth} package).
}
\item{kernel}{used for the calculations of the density lines
(see the \code{bkde} function of the \code{KernSmooth} package).
}
\item{cbreaks}{number of cells for the histograms per interval
of the grid of the bi-dimensional graphics.
}
\item{plot}{a logical indicating if the graphics is displayed
}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored
}
\item{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 \code{storeData} is
\code{FALSE}
}
\item{\dots}{Additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})
}
}
\details{
Density is calculated using the function \code{bkde} of the \code{KernSmooth} package.
}
\value{
An \code{ADEgS} object, a list of four graphical objects,
one \code{ADEg.S2} and three \code{trellis} (from \code{lattice}).
Their names are:
\item{\code{object}}{the \code{ADEg.S2} object}
\item{\code{densX}}{top histogram, a \code{trellis} object}
\item{\code{densY}}{right histogram, a \code{trellis} object}
\item{\code{link}}{corner graphics linking the two histograms, a \code{trellis} object}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\note{
Into the dots arguments, the usual parameters for the \code{s.label}
can be given with the \code{object} key.
Trellis parameters are used for the three remaining graphics.
\code{plot.polygon} handles the histogram aspect, \code{add.line} the
graduations lines and \code{plot.line} the density lines.
Finally, for the \code{link} graphic, labels aspect can be changed
using a \code{plabels} list, as for an \code{S2.label} object.
}
\seealso{
\code{\linkS4class{ADEg.S2}}
\code{\linkS4class{ADEgS}}
}
\examples{
data(rpjdl, package = "ade4")
coa1 <- ade4::dudi.coa(rpjdl$fau, scannf = FALSE, nf = 4)
labli <- s.label(coa1$li)
g1 <- addhist(labli)
g2 <- addhist(labli, plabels.cex = 0, cbreaks = 3)
labco <- s.label(coa1$co)
g3 <- addhist(labco, plabels.cex = 0, cbreaks = 3)
update(g3, pbackground.col = "grey85")
}
\keyword{aplot}
adegraphics/man/ADEgS-class.Rd 0000644 0001762 0000144 00000020462 13742303021 015553 0 ustar ligges users \name{ADEgS-class}
\docType{class}
\alias{ADEgS-class}
\alias{$,ADEgS-method}
\alias{[,ADEgS,numeric,missing,logical-method}
\alias{[,ADEgS,numeric,missing,missing-method}
\alias{[[,ADEgS,numeric,missing-method}
\alias{[[,ADEgS,character,missing-method}
\alias{[[<-,ADEgS,numeric,missing,ADEg-method}
\alias{[[<-,ADEgS,numeric,missing,ADEgS-method}
\alias{getcall,ADEgS-method}
\alias{getgraphics}
\alias{getgraphics,ADEgS-method}
\alias{getpositions}
\alias{getpositions,ADEgS-method}
\alias{length,ADEgS-method}
\alias{names,ADEgS-method}
\alias{names<-,ADEgS,character-method}
\alias{show,ADEgS-method}
\alias{plot,ADEgS-method}
\alias{plot,ADEgS,ANY-method}
\alias{print,ADEgS-method}
\alias{update,ADEgS}
\alias{update,ADEgS-method}
\title{Class \code{"ADEgS"}}
\description{
An object of \code{ADEgS} class is a complex graphic.
This class allows the superposition, the insertion and/or the juxtaposition of several \code{ADEg}, \code{trellis} and/or \code{ADEgS} objects.
The \code{ADEgS} class have neither father class nor son classes.
}
\section{Objects from the Class}{
\code{ADEgS} objects can be created by calls of the form \code{new("ADEgS", ...)}.
The regular usage in this package is to use the \code{ADEgS}, \code{add.ADEg}, \code{superpose}, \code{insert} or \code{+} functions.
}
\section{Slots}{
\describe{
\item{\code{ADEglist}}{a list of several \code{trellis}, \code{ADEg} and/or \code{ADEgS} objects.}
\item{\code{positions}}{a matrix with four columns and as many rows as the number of graphical objects in the \code{ADEglist} slot.
For each simple graphic, i.e. in each row, the coordinates of the top-right and the bottom-left hand corners are in \code{npc} unit (normalized parent coordinates).}
\item{\code{add}}{a square matrix with as many rows and columns as the number of graphical objects in the \code{ADEglist} slot.
The value at the i-th row and j-th column is equal to 1 whether the j-th graphical object in the \code{ADEglist} slot is superpose to i-th graphical one.
Otherwise, this value is equal to 0.}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Methods}{
\describe{
\item{[}{\code{signature(x = "ADEgS", i = "numeric", j = "missing", drop = "logical")}:
extracts the \code{i}-th sub-graphics in the \code{x@ADEglist}. \code{i} can be a vector.
If \code{i} is a single number and if the extracted graphic in an \code{ADEg} object, the sub-selection
is in the form of \code{ADEg} if \code{drop} is \code{TRUE} and in the form of \code{ADEgS} otherwise.}
\item{[}{\code{signature(x = "ADEgS", i = "numeric", j = "missing", drop = "missing")}:
the same than the previous method. \code{drop} is \code{FALSE} by default}
\item{[[}{\code{signature(x = "ADEgS", i = "numeric", j = "missing")}:
extracts one sub-graphic, the \code{i}-th one, in the \code{x@ADEglist}}
\item{[[}{\code{signature(x = "ADEgS", i = "character", j = "missing")}:
extracts one sub-graphic, named \code{i} in the \code{x@ADEglist}}
\item{[[<-}{\code{signature(x = "ADEgS", i = "numeric", j = "missing", value = "ADEg")}:
replaces one sub graphic, the \code{i}-th one, by an \code{ADEg} object in the \code{x@ADEglist}}
\item{[[<-}{\code{signature(x = "ADEgS", i = "numeric", j = "missing", value = "ADEgS")}:
replaces one sub graphic, the \code{i}-th one, by an \code{ADEgS} object in the \code{x@ADEglist}}
\item{$}{\code{signature(x = "ADEgS")}:
extracts one sub-graphic by its name in the \code{x@ADEglist}}
\item{getpositions}{\code{signature(object = "ADEgS")}:
returns the positions matrix of the object, i.e. \code{object@positions}}
\item{getgraphics}{\code{signature(object = "ADEgS")}:
returns the list of graphics of the object,
i.e. \code{object@ADEglist}}
\item{getcall}{\code{signature(object = "ADEgS")}:
returns the call of the object, i.e. \code{object@Call}}
\item{names}{\code{signature(object = "ADEgS")}:
returns the graphics' names of the object, i.e. the names of \code{object@ADEglist}}
\item{names<-}{\code{signature(object = "ADEgS")}:
replaces the graphics' names of the object, i.e. the names of \code{object@ADEglist}}
\item{length}{\code{signature(x = "ADEgS")}:
returns the number of graphics into \code{x}, i.e. the length of \code{x@ADEglist}}
\item{plot}{\code{signature(x = "ADEgS")}: same as \code{print}}
\item{print}{\code{signature(x = "ADEgS")}:
displays the graphical elements into one device using positions and superposition management (\code{x@add} matrix)}
\item{show}{\code{signature(object = "ADEgS")}: same as \code{print}}
\item{superpose}{\code{signature(g1 = "ADEgS", g2 = "ADEg", which = "numeric", plot = "logical")}:
creates a new \code{"ADEgS"} object performing a superposition of \code{g2} on the which-th \code{ADEg} object of \code{g1}.
This object is printed if \code{plot} is \code{TRUE}.}
\item{superpose}{\code{signature(g1 = "ADEgS", g2 = "ADEg", which = "numeric", plot = "ANY")}:
creates a new \code{"ADEgS"} object performing a superposition of \code{g2} on the which-th \code{ADEg} object of \code{g1}.
This object is printed only if \code{plot} is \code{TRUE}.}
\item{superpose}{\code{signature(g1 = "ADEgS", g2 = "ADEg", which = "missing", plot = "ANY")}:
creates a new \code{"ADEgS"} object performing a superposition of \code{g2} on the last \code{ADEg} object of \code{g1}.
This object is printed only if \code{plot} is \code{TRUE}.}
\item{superpose}{\code{signature(g1 = "ADEgS", g2 = "ADEgS", which = "missing", plot = "ANY")}:
creates a new \code{"ADEgS"} object performing a superposition between two \code{ADEgS} having the same length and the same \code{positions} slot.
It is used when \code{g1} and \code{g2} are both created with a partition of individual groups, variables or analysis' axis.}
\item{+}{\code{signature(e1 = "ADEg", e2 = "ADEgS")}:
creates a new \code{"ADEgS"} object performing a superposition of \code{e1} on \code{e2}.}
\item{+}{\code{signature(e1 = "ADEgS", e2 = "ADEg")}:
creates a new \code{"ADEgS"} object performing a superposition of \code{e2} on \code{e1}.}
\item{cbindADEg}{\code{signature(g1 = "ADEgORADEgS", g2 = "ADEgORADEgS")}:
creates a new \code{"ADEgS"} object combining \code{g1} on \code{g2} by columns.}
\item{rbindADEg}{\code{signature(g1 = "ADEgORADEgS", g2 = "ADEgORADEgS")}:
creates a new \code{"ADEgS"} object combining \code{g1} on \code{g2} by rows.}
\item{update}{\code{signature(object = "ADEgS")}:
modifies the graphical parameters of each sub-graphics listed in \code{object@ADEglist} and/or the object's names
(with the key word \code{names}) and/or the \code{object@positions} slot (with the key word \code{positions}), after creation of the \code{object}.
The current display is updated and a modified object is returned.}
\item{insert}{\code{signature(graphics = "ADEgS", oldgraphics = "missing", posi, ratio, inset, plot, which, dispatch)}:
creates a new \code{"ADEgS"} object performing an insertion of \code{graphics} into the current device.}
\item{insert}{\code{signature(graphics = "ADEgS", oldgraphics = "ADEg", posi, ratio, inset, plot)}:
creates a new \code{"ADEgS"} object performing an insertion of \code{graphics} into \code{oldgraphics}.}
\item{insert}{\code{signature(graphics = "ADEgORtrellis", oldgraphics = "ADEgS", posi, ratio, inset, plot, which)}:
creates a new \code{"ADEgS"} object performing an insertion of \code{graphics} into \code{oldgraphics}.}
\item{insert}{\code{signature(graphics = "ADEgS", oldgraphics = "ADEgS", posi, ratio, inset, plot, which, dispatch)}:
creates a new \code{"ADEgS"} object performing an insertion of \code{graphics} into \code{oldgraphics}.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\link{ADEgS}}
\code{\link{superpose}}
\code{\link{insert}}
}
\examples{
showClass("ADEgS")
}
\keyword{classes}
adegraphics/man/s.label.Rd 0000644 0001762 0000144 00000005140 13742303021 015101 0 ustar ligges users \name{s.label}
\alias{s.label}
\title{2-D scatter plot with labels}
\description{
This function represents a two dimensional scatter plot associating labels with points.
}
\usage{
s.label(dfxy, labels = rownames(dfxy), xax = 1, yax = 2,
facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE,
pos = -1, ...)
}
\arguments{
\item{dfxy}{a data frame used to produce the plot}
\item{labels}{a vector of character strings for the points' labels}
\item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
\item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
\item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{S2.label}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or vectors for \code{xax}/\code{yax} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S2.label}}
\code{\linkS4class{ADEg.S2}}
}
\examples{
x0 <- runif(50, -2, 2)
y0 <- runif(50, -2, 2)
z <- x0 ^ 2 + y0 ^ 2
g1 <- s.label(data.frame(x0, y0), label = as.character(z < 1), paxes.draw = TRUE,
axis.text = list(col = "grey"))
data(mafragh, package = "ade4")
g2 <- s.label(mafragh$xy, nb = mafragh$nb, paxes.draw = FALSE)
data(irishdata, package = "ade4")
g3 <- s.label(irishdata$xy.utm, Sp = irishdata$Spatial.contour)
## update irishdata$xy.utm call to irishdata$xy
\dontrun{data(atlas, package = "ade4")
g4 <- s.label(atlas$xy, lab = atlas$names.district, Sp = atlas$Spatial.contour)
g5 <- s.label(atlas$xy, lab = atlas$names.district, Sp = atlas$Spatial)
}
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/Tr.label-class.Rd 0000644 0001762 0000144 00000007313 13742303021 016333 0 ustar ligges users \name{Tr.label-class}
\docType{class}
\alias{Tr.label}
\alias{Tr.label-class}
\alias{prepare,Tr.label-method}
\alias{panel,Tr.label-method}
\title{Class \code{Tr.label}}
\description{
A class for creating and drawing triangular plot with point label.
}
\section{Objects from the Class}{
\code{Tr.label} objects can be created by calls of the form \code{new("Tr.label", ...)}.
The regular usage in this package is to use the \code{triangle.label} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxyz}: the displayed values in the form of a three columns data frame, a name or a matching call.}
\item{\code{labels}: a character vector containing labels for points.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.Tr} class.
The specific slots for \code{Tr.class} objects are: \itemize{
\item{\code{addmean}: a logical to plot the mean.}
\item{\code{addaxes}: a logical to draw the principal axes.}
\item{\code{meanpar}: a list to represent mean points using \code{pch}, \code{cex} and \code{col}.}
\item{\code{axespar}: a list to represent axes lines using \code{col}, \code{lwd} and \code{lty}.}
\item{\code{max3d} and \code{min3d}: vectors of three values for triangular maximal and minimal limits.}
\item{\code{adjust}: a logical to adjust the device with the limits of the smaller equilateral triangle containing the values.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{cornerp}: coordinates of the triangle extremities.}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.Tr}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.Tr}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.Tr}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.Tr}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.Tr"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{Tr.label} are:
\describe{
\item{prepare}{\code{signature(object = "Tr.label")}:
calls the parent method (\code{prepare} for \code{ADEg.Tr}), modifies some graphical parameters used
by default and defines the mean point and the axes.}
\item{panel}{\code{signature(object = "Tr.label")}:
draws lines, labels and points.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.Tr}}
\code{\link{triangle.label}}
}
\examples{
showClass("Tr.label")
}
\keyword{classes}
adegraphics/man/S2.corcircle-class.Rd 0000644 0001762 0000144 00000006663 13742303021 017127 0 ustar ligges users \name{S2.corcircle-class}
\docType{class}
\alias{S2.corcircle}
\alias{S2.corcircle-class}
\alias{prepare,S2.corcircle-method}
\alias{panel,S2.corcircle-method}
\title{Class \code{S2.corcircle}}
\description{
A class for creating and drawing a correlation circle.
}
\section{Objects from the Class}{
\code{S2.corcircle} objects can be created by calls of the form \code{new("S2.corcircle", ...)}.
The regular usage in this package is to use the \code{s.corcircle} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
\item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
\item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
\item{\code{labels}: a vector containing the points' labels.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
The specific slot for \code{S2.corcircle} objects is: \itemize{
\item{\code{fullcircle}: a logical to include the complete circle (limits are then c(-1, 1)).}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{backgrid}: a list of elements for grid lines}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S2}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S2.corcircle} are:
\describe{
\item{prepare}{\code{signature(object = "S2.corcircle")}:
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and prepares the drawn grid.}
\item{panel}{\code{signature(object = "S2.corcircle")}:
draws arrows, labels and axes.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S2}}
\code{\link{s.corcircle}}
}
\examples{
showClass("S2.corcircle")
}
\keyword{classes}
adegraphics/man/ADEg.S2-class.Rd 0000644 0001762 0000144 00000011777 13742303021 015724 0 ustar ligges users \name{ADEg.S2-class}
\docType{class}
\alias{ADEg.S2}
\alias{ADEg.S2-class}
\alias{prepare,ADEg.S2-method}
\alias{setlatticecall,ADEg.S2-method}
\alias{gettrellis,ADEg.S2-method}
\alias{panelbase,ADEg.S2-method}
\title{Class \code{ADEg.S2}}
\description{
An object of \code{ADEg.S2} class represents bi-dimensional data.
The \code{ADEg.S2} class is a virtual class, i.e. a class which is not possible to create objects but which have heirs.
This class inherits from \code{ADEg} class and
has eleven son classes : \code{S2.arrow}, \code{S2.class}, \code{S2.corcircle}, \code{S2.density}, \code{S2.distri},
\code{S2.image}, \code{S2.label}, \code{S2.logo}, \code{S2.match}, \code{S2.traject} and \code{S2.value}.
}
\section{Objects from the Class}{
None object of this class can be instantiated.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
\item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
\item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list of two elements to create the \code{trellis} object:
\itemize{
\item{\code{graphictype}: \code{xyplot}}
\item{\code{arguments}: its parameters to obtain the \code{trellis} object}
}}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class:
\itemize{
\item{\code{fullcircle}: only for \code{S2.corcircle} objects}
\item{\code{method}: only for \code{S2.value} objects}
\item{\code{symbol}: only for \code{S2.value} objects}
\item{\code{center}: only for \code{S2.value} objects}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{xfullcircle.update} and \code{yfullcircle.update}: a logical indicating if the circle size is updating (only for \code{S2.corcircle} objects)}
\item{\code{plegend.update}: a logical indicating if the legend parameters are updating}
\item{\code{breaks.update}: a logical indicating if the legend breaks are updating}
\item{\code{backgrid}: a list of elements for grid lines}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg}}, directly.
}
\section{Methods}{
\describe{
\item{prepare}{\code{signature(object = "ADEg.S2")}:
performs the calculations before display the object (e.g. limits, grid and axis calculations)}
\item{setlatticecall}{\code{signature(object = "ADEg.S2")}:
prepares the \code{lattice.call} slot}
\item{panelbase}{\code{signature(object = "ADEg.S2")}:
defines the graphical background (e.g. grid and box)}
\item{gettrellis}{\code{signature(object = "ADEg.S2")}:
converts the graphic into a \code{trellis} object of \code{lattice} class}
\item{zoom}{\code{signature(object = "ADEg.S2", zoom = "numeric", center = "missing")}:
performs a zoom in (if zoom < 1) or out (if zoom > 1) centered}
\item{zoom}{\code{signature(object = "ADEg.S2", zoom = "numeric", center = "numeric")}:
performs a zoom in (if zoom < 1) or out (if zoom > 1) around the center passed in parameter (center should be a two-length vector)}
\item{addhist}{\code{signature(object = "ADEg.S2")}:
adds histograms and density lines against a bi-dimensional graphics}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\link{addhist}}
\code{\link{zoom}}
\code{\link{adegpar}}
\code{\linkS4class{S2.arrow}}
\code{\linkS4class{S2.class}}
\code{\linkS4class{S2.corcircle}}
\code{\linkS4class{S2.density}}
\code{\linkS4class{S2.distri}}
\code{\linkS4class{S2.image}}
\code{\linkS4class{S2.label}}
\code{\linkS4class{S2.logo}}
\code{\linkS4class{S2.match}}
\code{\linkS4class{S2.traject}}
\code{\linkS4class{S2.value}}
\code{\linkS4class{ADEg}}
}
\examples{
showClass("ADEg.S2")
}
\keyword{classes}
adegraphics/man/S1.match-class.Rd 0000644 0001762 0000144 00000006133 13742303021 016245 0 ustar ligges users \name{S1.match-class}
\docType{class}
\alias{S1.match}
\alias{S1.match-class}
\alias{prepare,S1.match-method}
\alias{panel,S1.match-method}
\title{Class \code{S1.match}}
\description{
A class for the creation and display of paired scores.
}
\section{Objects from the Class}{
\code{S1.match} objects can be created by calls of the form \code{new("S1.match", ...)}.
The regular usage in this package is to use the \code{s1d.match} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
\item{\code{labels}: the labels' names drawn for each score.}
\item{\code{at}: the index value.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S1} class.}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters.
The specific slot for \code{S1.match} objects is: \itemize{
\item{\code{rug}: an index value indicating where the rugs are drawn.}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S1}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S1}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S1}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S1}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S1"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S1.match} are:
\describe{
\item{prepare}{\code{signature(object = "S1.match")}:
calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "S1.match")}:
draws score points and matching segments and labels.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S1}}
\code{\link{s1d.match}}
}
\examples{
showClass("S1.match")
}
\keyword{classes}
adegraphics/man/ADEgS.Rd 0000644 0001762 0000144 00000004366 13742303021 014455 0 ustar ligges users \name{ADEgS}
\alias{ADEgS}
\title{Creation of \code{ADEgS} objects}
\description{
Creates and displays an \code{"ADEgS"} object, a set of \code{ADEg}, \code{trellis} and/or \code{ADEgS} objects,
managed by superposition, insertion and/or juxtaposition.
}
\usage{
ADEgS(adeglist, positions, layout, add = NULL, plot = TRUE)
}
\arguments{
\item{adeglist}{a list of several \code{trellis}, \code{ADEg} and/or \code{ADEgS} objects.}
\item{positions}{a matrix with four columns and as many rows as the number of graphical objects in \code{ADEglist} slot.
For each simple graphic, i.e. in each row, the coordinates of the top-right and the bottom-left hand corners are in \code{npc} unit (normalized parent coordinates).}
\item{layout}{a layout indication in two possible forms: \itemize{
\item{a list containing arguments of the \code{layout} function}
\item{a two-length vector containing rows' and columns' number of layout}
}}
\item{add}{a square matrix with as many rows and columns as the number of graphical objects in the \code{ADEglist} slot.
The value at the i-th row and j-th column is equal to 1 whether the j-th graphical object in \code{ADEglist} slot is superpose to i-th graphical one.
Otherwise, this value is equal to 0.}
\item{plot}{a logical. If the graphics should be displayed}
}
\value{
an \code{ADEgS} object. If \code{plot = TRUE}, the created object is displayed.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEgS}}
}
\examples{
xy <- matrix(rnorm(20), ncol = 2)
g1 <- s.label(xy)
g2 <- s.class(xy, fac = as.factor(rep(LETTERS[1:2], length.out = 10)), ppoints.cex = 0,
col = c("blue", "red"))
g3 <- ADEgS(list(g1, g2), rbind(c(0, 0, 0.5, 1), c(0.5, 0, 1, 1)))
g4 <- ADEgS(list(g1, g2), layout = c(2, 1))
g5 <- ADEgS(list(g1, g2))
g6 <- ADEgS(list(g1, g2), add = matrix(c(0, 1, 0, 0), byrow = TRUE, ncol = 2))
data(olympic, package = "ade4")
dudi1 <- ade4::dudi.pca(olympic$tab, scan = FALSE)
g7 <- s.arrow(dudi1$li)
g8 <- s.corcircle(dudi1$co, lab = names(olympic$tab))
g9 <- ADEgS(list(g7, g8), rbind(c(0, 0, 0.5, 1), c(0.5, 0, 1, 1)))
g9[[1]]
g9[1, drop = FALSE]
length(g9)
}
\keyword{hplot}
adegraphics/man/adeg.panel.join.Rd 0000644 0001762 0000144 00000002025 13742303021 016514 0 ustar ligges users \name{adeg.panel.join}
\alias{adeg.panel.join}
\title{Panel function for joining lines.}
\description{
Panel function for drawing lines as part of a circle centred in (0, 0) into a \code{trellis} graphic (\code{lattice}
package).
}
\usage{
adeg.panel.join(drawLines, params = list())
}
\arguments{
\item{drawLines}{a vector containing the level values used as radius of the circle}
\item{params}{graphical parameters : \code{plabels} and \code{add.line} (\code{lattice})}
}
\value{
Displays level lines and their values.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\note{
For more information about the use of panel functions, please see the \code{lattice} package developed by Deepayan Sarkar.
}
\examples{
if(require(lattice, quietly = TRUE)) {
xyplot(0:20 ~ 0:20, drawLines = c(5, 10, 15), params = list(plabels.cex = 2),
panel = function(drawLines, params){
adeg.panel.join(drawLines = drawLines, params = params)})
}}
\keyword{aplot} adegraphics/man/s1d.label.Rd 0000644 0001762 0000144 00000004724 13742303021 015335 0 ustar ligges users \name{s1d.label}
\alias{s1d.label}
\title{1-D plot of a numeric score with labels}
\description{
This function represents a numeric labeled score
}
\usage{
s1d.label(score, labels = 1:NROW(score), at = 0.5, poslabel = c("regular",
"value"), facets = NULL, plot = TRUE, storeData =
TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{score}{a numeric vector (or a data frame) used to produce the plot}
\item{labels}{the labels' names drawn for each \code{score} value}
\item{at}{a numeric vector used as an index}
\item{poslabel}{the label position, it can be \code{regular} or \code{value}.
If \code{regular}, labels are evenly spaced.
If \code{value}, labels are placed on the weighted mean of their class.}
\item{facets}{a factor splitting \code{score} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Graphical parameters for rugs are available in \code{plines} of \code{adegpar}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\value{
An object of class \code{ADEg} (subclass \code{S1.label}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or data frame for \code{score} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S1.label}}
\code{\linkS4class{ADEg.S1}}
}
\examples{
data(meau, package = "ade4")
envpca <- ade4::dudi.pca(meau$env, scannf = FALSE)
g1 <- s1d.label(envpca$l1[, 1], row.names(envpca$l1), plot = FALSE)
g2 <- s1d.label(envpca$co[, 1], row.names(envpca$co), p1d.reverse = TRUE, plot = FALSE)
G <- ADEgS(c(g1, g2), layout = c(2, 1))
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/sortparamADEg.Rd 0000644 0001762 0000144 00000003231 13742303021 016251 0 ustar ligges users \name{sortparamADEg}
\alias{sortparamADEg}
\alias{sortparamADEgS}
\title{
Sort a sequence of graphical parameters
}
\description{
Sort a sequence of graphical parameters in several lists.
}
\usage{
sortparamADEg(...)
sortparamADEgS(..., graphsnames, nbsubgraphs = rep(1, length(graphsnames)))
}
\arguments{
\item{...}{a sequence of graphical parameters}
\item{graphsnames}{a sequence containing the name of each simple graph of the ADEgS}
\item{nbsubgraphs}{a sequence containing the number of sub-graphs in each graph named in \code{graphsnames}}
}
\value{
\code{sortparamADEg} return a list of four lists named \code{adepar}, \code{trellis}, \code{g.args} and \code{rest}.
\code{sortparamADEgS} return a list of as many lists as the length of \code{graphsnames}, i.e., as the number of
sub-graphs of the ADEgS. The names of the lists are \code{graphsnames} and each sub-list is the result of the
\code{sortparamADEg} function aplly on each sub-graph.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\examples{
l1 <- sortparamADEg(xlab = "x-axis label", ylab = "y-axis label", plabels.cex = 1.5,
porigin.include = FALSE)
length(l1)
names(l1)
l2 <- sortparamADEgS(xlab = "x-axis label", eig.main = "Eigenvalues", row.ppoints.col = "red",
porigin.include = FALSE, graphsnames = c("row", "col", "eig"))
names(l2)
names(l2$row)
l3 <- sortparamADEgS(xlab = "x-axis label", eig.main = "Eigenvalues", row.ppoints.col = "pink",
porigin.include = FALSE, graphsnames = c("row", "col", "eig"), nbsubgraphs = c(1, 2, 1))
names(l3)
length(l3$row)
length(l3$col)
}
\keyword{aplot}
adegraphics/man/insert.Rd 0000644 0001762 0000144 00000006344 13742303021 015074 0 ustar ligges users \name{insert}
\alias{insert}
\alias{insert-methods}
\alias{insert,ADEgORtrellis,missing-method}
\alias{insert,ADEgS,missing-method}
\alias{insert,ADEgORtrellis,ADEg-method}
\alias{insert,ADEgS,ADEg-method}
\alias{insert,ADEgORtrellis,ADEgS-method}
\alias{insert,ADEgS,ADEgS-method}
\title{Insert a graphic into an existing one}
\description{
This function inserts a first graphic into a previously created and/or a displayed one.
}
\usage{
insert(graphics, oldgraphics, posi = c("bottomleft", "bottomright", "topleft",
"topright"), ratio = 0.2, inset = 0.0, plot = TRUE, which, dispatch = FALSE)
}
\arguments{
\item{graphics}{an object of class \code{ADEg}, \code{ADEgS} or \code{trellis}}
\item{oldgraphics}{an object of class \code{ADEg}, \code{ADEgS} or \code{missing}. If \code{oldgraphics} is \code{missing},
\code{graphics} is added on the current device.}
\item{posi}{a character value or a two-length numeric vector (in normalized parent coordinates \code{npc} from 0 to 1) indicating
the position of \code{olgraphics} added into \code{graphics}}
\item{ratio}{a numeric value from 0 to 1 indicating the size of \code{olgraphics} regarding the plot region}
\item{inset}{the inset from which the graph is drawn regarding the plot region.
It can be a two-length vector giving the inset in x and y. If atomic, same inset is used in x and y.}
\item{plot}{a logical indicating if the graphics is displayed}
\item{which}{a numeric value or a vector of values only used if \code{oldgraphics} is an \code{ADEgS} object,
indicating the which-th sub-graphic of \code{oldgraphics} where \code{graphics} is added.}
\item{dispatch}{a logical only used if both \code{graphics} and \code{oldgraphics} are \code{ADEgS} objects with same length,
indicating if \code{graphics} is added one by one int \code{oldgraphics}. It is used when both \code{graphics} and \code{oldgraphics}
are created with \code{facets} option.}
}
\value{
An object of class \code{"ADEgS"}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEgS}}
}
\examples{
data(deug, package = "ade4")
dd1 <- ade4::dudi.pca(deug$tab, scannf = FALSE, nf = 4)
g1 <- s.label(dfxy = dd1$li, labels = rownames(dd1$li), plabels = list(cex = 0.75), plot = FALSE)
g2 <- s1d.barchart(score = dd1$eig, plot = FALSE,
ppolygons = list(col = c(rep("black", 2), rep("grey", 2), rep("white", 5))),
p1d = list(horizontal = FALSE), psub = list(position = "topright", text = "Eigenvalues"),
pgrid = list(draw = FALSE), pbackground = list(box = TRUE), xlim = c(0.5, 9.5))
g1
g3 <- insert(g2, plot = FALSE)
mat <- g3@positions
mat[2, ] <- c(0.8, 0, 1, 0.2)
update(g3, positions = mat, plot = FALSE)
print(g3) ## square == NULL
print(g3, square = TRUE)
print(g3, square = FALSE)
g4 <- insert(g2, g1, posi = "topleft")
data(jv73, package = "ade4")
pca1 <- ade4::dudi.pca(jv73$morpho, scannf = FALSE)
g5 <- s.value(jv73$xy, pca1$li[, 1:2], porigin.include = FALSE, plot = FALSE)
g6 <- s.corcircle(pca1$co, pbackground.box = FALSE, plot = FALSE)
g7 <- insert(g6, g5, posi = c(0.3, 0.4, 0.5, 0.6))
}
\keyword{hplot}
\keyword{aplot}
\keyword{methods}
adegraphics/man/layout2position.Rd 0000644 0001762 0000144 00000003151 13742303021 016745 0 ustar ligges users \name{layout2position}
\alias{layout2position}
\title{Transform a layout matrix into a position one}
\description{
This function transforms layout's informations into a position matrix useful for
\code{ADEgS} and for \code{lattice} graphics.
}
\usage{
layout2position(mat, widths = rep(1, NCOL(mat)), heights = rep(1, NROW(mat)), ng,
square = FALSE)
}
\arguments{
\item{mat}{a matrix indicating the location of figures to display
(each value must be 0 or a positive integer) or a two-length vector indicating the number of rows
and columns in the corresponding layout.}
\item{widths}{a vector of relative values for the columns' widths on the device. Their sum must be equal to the number of columns.}
\item{heights}{a vector of relative values for the rows' heights on the device. Their sum must be equal to the number of rows.}
\item{ng}{a value for the number of positions needed (i.e. the number of graphics to plot)}
\item{square}{a logical indicating if the graphics is an isometric plot}
}
\value{
A four-columns matrix indicating the coordinates (in normalized parent coordinates \code{npc})
of the top-right and bottom-left hand corners of each displayed figure on the device.
}
\note{
This function is strongly inspired by the \code{layout} function in \code{graphics} package.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\link{layout}}
}
\examples{
layout2position(mat = rbind(c(0, 0, 1), c(2, 2, 1)))
layout2position(mat = cbind(c(0, 0, 1), c(2, 2, 1)), widths = c(0.5, 1.5))
}
adegraphics/man/plotEig.Rd 0000644 0001762 0000144 00000005001 13742303021 015160 0 ustar ligges users \name{plotEig}
\alias{plotEig}
\title{
Plot a barchart of eigen values
}
\description{
This function represents a simplified barchart adapted to display eigen values.
The bar color depends on whether the axis is displayed, kept or not.
}
\usage{
plotEig(eigvalue, nf, xax = 1, yax = 2, col.plot = "black", col.kept = "grey",
col = "white", facets = NULL, plot = TRUE, storeData = FALSE, pos = -1, ...)
}
\arguments{
\item{eigvalue}{a numeric vector of eigenvalues}
\item{nf}{the number of retained factors, NULL if not provided}
\item{xax}{an integer indicating which factor is plotted on the x-axis}
\item{yax}{an integer indicating which factor is plotted on the y-axis}
\item{col.plot}{a color value to fill the bar corresponding to the displayed factors}
\item{col.kept}{a color value to fill the bar corresponding to the kept by not displayed factors}
\item{col}{a color value to fill the bar corresponding to the other factors}
\item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{C1.barchart}).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\details{
Graphical parameters for bars are available in \code{ppolygons} of \code{adegpar}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{C1.barchart}}
\code{\linkS4class{ADEg.C1}}
}
\examples{
data(microsatt, package = "ade4")
w <- ade4::dudi.coa(data.frame(t(microsatt$tab)), scann = FALSE, nf = 3)
g1 <- s.label(w$co, plot = FALSE)
g2 <- plotEig(w$eig, w$nf, psub = list(text = "Eigenvalues"), pbackground = list(box = TRUE),
plot = FALSE)
G <- insert(g2, g1, posi = "bottomright", ratio = 0.25)
}
\keyword{aplot}
adegraphics/man/s1d.density.Rd 0000644 0001762 0000144 00000005730 13742303021 015733 0 ustar ligges users \name{s1d.density}
\alias{s1d.density}
\title{1-D plot of a numeric score by density curves}
\description{
This function represents a score with a density curve for each level of a factor.
}
\usage{
s1d.density(score, fac = gl(1, NROW(score)), kernel = c("normal", "box",
"epanech", "biweight", "triweight"), bandwidth = NULL, gridsize = 450,
col = NULL, fill = TRUE, facets = NULL, plot = TRUE, storeData = TRUE,
add = FALSE, pos = -1, ...)
}
\arguments{
\item{score}{a numeric vector (or a data frame) used to produce the plot}
\item{fac}{a factor (or a matrix of factors) to split \code{score}}
\item{kernel}{the smoothing kernel used, see \code{\link[KernSmooth]{bkde}}}
\item{bandwidth}{the kernel bandwidth smoothing parameter}
\item{gridsize}{the number of equally spaced points at which to estimate the density}
\item{col}{a logical, a color or a colors vector for labels, rugs, lines and polygons according to their factor level.
Colors are recycled whether there are not one color by factor level.}
\item{fill}{a logical to yield the polygons density curves filled}
\item{facets}{a factor splitting \code{score} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
\code{kernel}, \code{bandwidth} and \code{gridsize} are passed as parameters to \code{\link[KernSmooth]{bkde}} function of the \code{KernSmooth} package.
Graphical parameters for rugs are available in \code{plines} of \code{adegpar} and the ones for density curves filled in \code{ppolygons}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\value{
An object of class \code{ADEg} (subclass \code{C1.density}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or data frame for \code{score} or data frame for \code{fac} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{C1.density}}
\code{\linkS4class{ADEg.C1}}
}
\examples{
score <- c(rnorm(1000, mean = -0.5, sd = 0.5), rnorm(1000, mean = 1))
fac <- rep(c("A", "B"), each = 1000)
s1d.density(score, fac, col = c(2, 4), p1d.reverse = TRUE)
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/adeg.panel.Spatial.Rd 0000644 0001762 0000144 00000005536 13742303021 017164 0 ustar ligges users \name{adeg.panel.Spatial}
\alias{adeg.panel.Spatial}
\title{Panel function for adding spatial objects.}
\description{
Panel function adapted from the \code{Sp} package for displaying all kind of spatial
objects handled by \code{Sp} (for classes inherited from the superclass \code{Spatial})
into a \code{trellis} graphic (\code{lattice} package).
}
\usage{
adeg.panel.Spatial(SpObject, sp.layout = NULL, col = 1, border = 1, lwd = 1,
lty = 1, alpha = 0.8, cex = 1, pch = 20, n = length(col), spIndex = 1, ...)
}
\arguments{
\item{SpObject}{an object of class \code{"SpatialPoints"}, \code{"SpatialPointsDataFrame"},\cr
\code{"SpatialPixels"}, \code{"SpatialPixelsDataFrame"}, \code{"SpatialGrid"},\cr
\code{"SpatialGridDataFrame"}, \code{"SpatialLines"}, \code{"SpatialLinesDataFrame"},\cr
\code{"SpatialPolygons"} or \code{"SpatialPolygonsDataFrame"}}
\item{sp.layout}{a list of layout items. See \code{spplot} for more information}
\item{col}{background color (fill) of \code{Spobject}}
\item{border}{border color}
\item{lwd}{line width (border)}
\item{lty}{line type (border)}
\item{alpha}{background transparency of \code{Spobject}}
\item{cex}{point size}
\item{pch}{point type}
\item{n}{if \code{SpObject} contains data, the _desired_ number
of intervals splitting the data (using \code{pretty}).}
\item{spIndex}{if the \code{SpObject} contains a data frame, its values
are represented with a color code. Only the \code{spIndex} data frame
is represented}
\item{\dots}{for coherence with panel functions}
}
\value{
Draws the Spatial object and layout.
}
\references{
Package \code{Sp}. Author: Edzer Pebesma, Roger Bivand, Barry Rowlingson and Virgilo Gomez-Rubio.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\note{
If \code{SpObject} contains several maps, only the first one is selected.
Also for objects containing more data (for classes \code{data.frame} with a slot \code{data}), this information is also shown.
To do so, various colors can be used (according to the col arguments).
For more information about the use of panel functions, please see the \code{lattice} package developed by Deepayan Sarkar.
}
\examples{
if(require(lattice, quietly = TRUE) & require(sp, quietly = TRUE)) {
data(elec88, package = "ade4")
xy <- elec88$xy
arrow <- list("SpatialPolygonsRescale", offset = c(150000,1700000),
layout.north.arrow(), scale = 100000)
xyplot(xy[, 2] ~ xy[, 1], aspect = "iso", panel = function(...){
adeg.panel.Spatial(SpObject = elec88$Spatial, sp.layout = list(arrow),
col = colorRampPalette(c("yellow", "blue"))(5), border =
"transparent")})
}
}
\seealso{
\code{\link[sp]{spplot}}
\code{\link[sp]{sp.lines}}
\code{\link[sp]{sp.polygons}}
\code{\link[sp]{sp.grid}}
}
\keyword{aplot}
adegraphics/man/C1.curve-class.Rd 0000644 0001762 0000144 00000006633 13742303021 016262 0 ustar ligges users \name{C1.curve-class}
\docType{class}
\alias{C1.curve}
\alias{C1.curve-class}
\alias{prepare,C1.curve-method}
\alias{panel,C1.curve-method}
\alias{C1.curves}
\alias{C1.curves-class}
\alias{panel,C1.curves-method}
\title{Class \code{C1.curve}}
\description{
A class for the creation and display of a numeric score linked by curves.
The \code{C1.curves} allows to deal with multiple scores.
}
\section{Objects from the Class}{
\code{C1.curve} objects can be created by calls of the form \code{new("C1.curve", ...)}. The regular usage in this package is to use the \code{s1d.curve} function.
\code{C1.curves} objects can be created by calls of the form \code{new("C1.curves", ...)}. The regular usage in this package is to use the \code{s1d.curves} function. Class \code{\linkS4class{C1.curves}} extends \code{C1.curve} directly.\cr
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a vector, a factor, a name or a matching call.}
\item{\code{at}: the index value.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.C1}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{C1.curve} and \code{C1.curves} are:
\describe{
\item{prepare}{\code{signature(object = "C1.curve")}:
calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "C1.curve")}:
draws points and curves.}
\item{panel}{\code{signature(object = "C1.curves")}:
draws points and curves.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.C1}}
\code{\link{s1d.curve}}
\code{\link{s1d.curves}}
}
\examples{
showClass("C1.curve")
showClass("C1.curves")
}
\keyword{classes}
adegraphics/man/triangle.match.Rd 0000644 0001762 0000144 00000005026 13742303021 016464 0 ustar ligges users \name{triangle.match}
\alias{triangle.match}
\title{Ternary plot of the matching between two sets of coordinates}
\description{
This function represents a three dimensional scatter plot of paired coordinates.
}
\usage{
triangle.match(dfxyz1, dfxyz2, labels = row.names(as.data.frame(dfxyz1)),
min3d = NULL, max3d = NULL, adjust = TRUE, showposition = TRUE, facets = NULL,
plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dfxyz1}{a three columns data frame, the first system of coordinates, used to produce the plot}
\item{dfxyz2}{a three columns data frame, the second system of coordinates, with as many rows as \code{dfxyz1}, used to produce the plot.}
\item{labels}{a vector of character strings containing the matches' labels}
\item{adjust}{a logical to adjust the device with the limits of the smaller equilateral triangle containing the values}
\item{min3d}{a vector of three values for triangular minimal limits}
\item{max3d}{a vector of three values for triangular maximal limits}
\item{showposition}{a logical indicating whether the used triangle should be shown in the complete one}
\item{facets}{a factor splitting the rows of \code{dfxyz} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{Tr.match}) or \code{ADEgS} (if \code{showposition} is TRUE,
if \code{add} is \code{TRUE} and/or if facets are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{Tr.match}}
\code{\linkS4class{ADEg.Tr}}
}
\examples{
data(euro123, package = "ade4")
triangle.match(euro123$in78, euro123$in86, plabels.cex = 0.8)
}
\keyword{hplot}
\keyword{aplot}
adegraphics/man/s.Spatial.Rd 0000644 0001762 0000144 00000004051 13742303021 015417 0 ustar ligges users \name{s.Spatial}
\alias{s.Spatial}
\title{Mapping of a Spatial* object}
\description{This function represents a background map linked with data or not.
}
\usage{
s.Spatial(spObj, col = TRUE, nclass = 5, scale = TRUE, plot = TRUE,
storeData = TRUE, pos = -1, ...)
}
\arguments{
\item{spObj}{an object deriving from class \code{Spatial} (package \code{sp})}
\item{col}{a logical or a color to fill the background color of \code{spObj}}
\item{nclass}{if \code{spObj} contains data, the desired number
of intervals splitting the data (using \code{pretty})}
\item{scale}{a \code{logical} indicating if numeric variables
should be scaled}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{S2.label}) or \code{ADEgS} (if \code{spObj} contains more than one column ).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S2.label}}
\code{\link[sp]{spplot}}
\code{\link[sp]{sp.lines}}
\code{\link[sp]{sp.polygons}}
\code{\link[sp]{sp.grid}}
}
\examples{
data(elec88, package = "ade4")
## mapping without data
g1 <- s.Spatial(elec88$Spatial)
\dontrun{
if(require(sp, quietly = TRUE)) {
## mapping with data
obj <- SpatialPolygonsDataFrame(Sr = elec88$Spatial, data = elec88$tab)
g2 <- s.Spatial(obj)
g3 <- s.Spatial(obj, nclass = 2, col = c("red", "blue"))
}
}
}
\keyword{hplot}
adegraphics/man/adegraphics-internal.Rd 0000644 0001762 0000144 00000001134 13742303021 017644 0 ustar ligges users \name{internals}
\alias{ADEgORtrellis}
\alias{ADEgORtrellis-class}
\alias{ADEgORADEgSORtrellis}
\alias{ADEgORADEgSORtrellis-class}
\alias{axis.L}
\alias{setlatticecall}
\alias{setlatticecall-methods}
\alias{setvalueskey}
\alias{printSuperpose}
\alias{printSuperpose-methods}
\alias{as.raster.pixmapGrey}
\alias{as.raster.pixmapRGB}
\alias{panel.symbols.grid}
\title{For internal use only}
\description{
Internal classes, methods and functions. Not for users.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\keyword{internal} adegraphics/man/s.image.Rd 0000644 0001762 0000144 00000010404 13742303021 015103 0 ustar ligges users \name{s.image}
\alias{s.image}
\title{2-D scatter plot with loess estimation of an additional numeric score (levelplot)}
\description{
This function represents a two dimensional scatter plot with a continuous convex colored surface
and/or contour lines representing a third variable.
}
\usage{
s.image(dfxy, z, xax = 1, yax = 2, span = 0.5, gridsize = c(80L, 80L),
contour = TRUE, region = TRUE, outsideLimits = NULL, breaks = NULL,
nclass = 8, col = NULL, facets = NULL,
plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dfxy}{a data frame used to produce the plot}
\item{z}{a vector (or a matrix) of values on the \code{dfxy} rows}
\item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
\item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
\item{span}{a value to control the degree of smoothing}
\item{gridsize}{a 1 or 2-length vector indicating the cell numbers (horizontally and vertically) of the grid for the colored surface}
\item{contour}{a logical to draw contour lines}
\item{region}{a logical to fill inter-contour regions}
\item{breaks}{a vector of values to split \code{z}. If \code{NULL}, \code{pretty(z, nclass)} is used.}
\item{nclass}{an integer for the number of desired intervals, ignored
if \code{breaks} is not missing.}
\item{outsideLimits}{specific limits for the surface as a set of polygons. It must be an \code{SpatialPolygons} object. Hole are authorized.}
\item{col}{a color or a colors vector used for the colored cells}
\item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{S2.image}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or multidimensional \code{z} or vectors for \code{xax}/\code{yax} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S2.image}}
\code{\linkS4class{ADEg.S2}}
}
\examples{
df1 <- data.frame(expand.grid(-3:3, -3:3))
names(df1) <- c("x", "y")
z1 <- (1 / sqrt(2)) * exp(-(df1$x ^ 2 + df1$y ^ 2) / 2)
g1 <- s.image(df1, z1)
# add a continuous color bar as legend
# update(g1, plegend.drawColorKey = TRUE)
g2 <- s.image(df1, z1, gridsize = 50)
g3 <- s.image(df1, z1, gridsize = 100)
## g4 <- s.image(df1, z1, gridsize = 1000, plot = FALSE)
\dontrun{
if(require(splancs, quietly = TRUE) & require(sp, quietly = TRUE)) {
Sr1 <- Polygon(cbind(c(0, 1, 2, 1, 2, 0, -2, -1, -2, -1, 0),
c(2.5, 1.5, 2, 0, -2, -1, -2, 0, 2, 1.5, 2.5)))
Sr2 <- Polygon(cbind(c(-0.5, 0.5, 0.5, -0.5, -0.5), c(0, 0, 1 ,1, 0)), hole = TRUE)
Srs2 <- Polygons(list(Sr1, Sr2), ID = "star and hole")
SPp <- SpatialPolygons(list(Srs2))
df2 <- cbind(c(rnorm(2000, 1, 0.25), rnorm(3000, -1, 1.5)), c(rnorm(2000, 1, 0.5),
rnorm(3000, -1, 3)))
z2 <- c(rnorm(2000, 12, 1), rnorm(3000, 1, 2))
g5 <- s.image(df2, z2, outsideLimits = SPp, grid = 200, xlim = c(-2.5, 2.5),
ylim = c(-2, 3), ppalette.quanti = colorRampPalette(c(grey(0.1), grey(0.9))))
data(t3012, package = "ade4")
g6 <- s.image(t3012$xy, ade4::scalewt(t3012$temp), porigin.include = FALSE)
g7 <- s.image(t3012$xy, ade4::scalewt(t3012$temp), outsideLimits = t3012$Spatial,
Sp = t3012$Spatial)
}
}
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/C1.density-class.Rd 0000644 0001762 0000144 00000007601 13742303021 016611 0 ustar ligges users \name{C1.density-class}
\docType{class}
\alias{C1.density}
\alias{C1.density-class}
\alias{prepare,C1.density-method}
\alias{panel,C1.density-method}
\title{Class \code{C1.density}}
\description{
A class for the creation and display of a numeric score using density curves.
}
\section{Objects from the Class}{
\code{C1.density} objects can be created by calls of the form \code{new("C1.density", ...)}.
The regular usage in this package is to use the \code{s1d.density} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
\item{\code{fac}: a factor for \code{score} to split in the form of a vector, a factor, a name or a matching call.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.
The specific slots for \code{C1.density} objects are: \itemize{
\item{\code{kernel}, \code{bandwidth} and \code{gridsize}: passed in parameters in \code{bkde} function of the
\code{KernSmooth} package.}
\item{\code{fill}: a logical to yield the polygons density curves filled.}
\item{\code{col}: a logical, a color or a colors vector to color labels, rugs, lines and polygons.}
}}
\item{\code{stats}}{a list of internal preliminary calculations.
The specific slot for \code{C1.density} objects is: \itemize{
\item{\code{densit}: the values of density curve calculated for each factor in \code{fac} computes with
the \code{bkde} function of the \code{KernSmooth} package.}
}}
\item{\code{s.misc}}{a list of some others internal parameters.
The specific slot for \code{C1.density} objects is: \itemize{
\item{\code{rug}: an index value indicating where the rugs are drawn}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.C1}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{C1.density} are:
\describe{
\item{prepare}{\code{signature(object = "C1.density")}:
calls the parent method (\code{prepare} for \code{ADEg.C1}), modifies some graphical parameters used by default and
calculates the density curves according to the numeric score and the values' categories.}
\item{panel}{\code{signature(object = "C1.density")}:
draws density curves.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.C1}}
\code{\link{s1d.density}}
}
\examples{
showClass("C1.density")
}
\keyword{classes}
adegraphics/man/adeg.panel.nb.Rd 0000644 0001762 0000144 00000004506 13742303021 016162 0 ustar ligges users \name{adeg.panel.nb}
\alias{adeg.panel.nb}
\alias{adeg.panel.edges}
\title{Panel functions for adding graphs.}
\description{
Panel function for representing a graph into a \code{trellis} graphic (\code{lattice} package).\cr
Two types of graph objects can be used: \code{nb} or \code{listw} object (\code{spdep} package) or simple edges informations.\cr
Directions associated with the edges are not displayed.\cr
}
\usage{
adeg.panel.nb(nbobject, coords, col.edge = "black", lwd = 1, lty = 1, pch = 20,
cex = 1, col.node = "black", alpha = 1)
adeg.panel.edges(edges, coords, col.edge = "black", lwd = 1, lty = 1, pch = 20,
cex = 1, col.node = "black", alpha = 1)
}
\arguments{
\item{nbobject}{a object of class \code{nb} or \code{listw}}
\item{edges}{a two columns matrix, representing the edges between the
nodes. For a row i, x[i, 1] and x[i, 2] are linked, x[i, 1] and x[i, 2] being vertices number.}
\item{coords}{a two columns matrix containing vertices' coordinates}
\item{col.edge}{edges' color(s)}
\item{lwd}{line width (edges). Can be a vector}
\item{lty}{line type (edges). Can be a vector}
\item{pch}{vertices' representation type (symbols). Can be a vector}
\item{cex}{symbols' size(s) (vertices). Can be a vector}
\item{col.node}{vertices' color(s). Can be a vector}
\item{alpha}{symbols' transparency}
}
\value{
Displays the neighboring graph.
}
\references{
Package \code{spdep}. Author: Roger Bivand
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\note{
For more information about the use of panel functions, please see the \code{lattice} package developed by Deepayan Sarkar.
}
\examples{
if(require(lattice, quietly = TRUE) &
require(spdep, quietly = TRUE)) {
data(elec88, package = "ade4")
coords <- elec88$xy
xyplot(coords[, 2] ~ coords[, 1],
panel = function(...){adeg.panel.nb(elec88$nb, coords, col.edge = c("blue", "red"))})
}
if(require(lattice, quietly = TRUE)) {
edges <- matrix(c(1, 2, 3, 2, 4, 1, 3, 4), byrow = TRUE, ncol = 2)
coords <- matrix(c(0, 1, 1, 0, 0, -1, -1, 0), byrow = TRUE, ncol = 2)
xyplot(coords[,2] ~ coords[,1],
panel = function(...){adeg.panel.edges(edges, coords, lty = 1:4, cex = 5)})
}
}
\seealso{
\code{\link[spdep]{plot.nb}}
}
\keyword{aplot}
adegraphics/man/s1d.interval.Rd 0000644 0001762 0000144 00000004602 13742303021 016075 0 ustar ligges users \name{s1d.interval}
\alias{s1d.interval}
\title{1-D plot of the interval between two numeric scores}
\description{
This function represents the interval between two scores using either segments or filled areas.
}
\usage{
s1d.interval(score1, score2, at = 1:NROW(score1), method = c("bars", "area"),
facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{score1}{a numeric vector (or a data frame) used to produce the plot}
\item{score2}{a numeric vector with as many values as values (or rows) in \code{score1}}
\item{at}{a numeric vector used as an index}
\item{method}{a value, \code{bars} or \code{area}, to represent either segments or areasbetween scores.}
\item{facets}{a factor splitting \code{score} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Graphical parameters for polygons, lines and segment boundaries are available in respectively
\code{ppolygons}, \code{plines} and \code{parrows} of \code{adegpar}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\value{
An object of class \code{ADEg} (subclass \code{C1.interval}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or data frame for \code{score} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{C1.interval}}
\code{\linkS4class{ADEg.C1}}
}
\examples{
set.seed(40)
sc1 <- rnorm(10)
sc2 <- rnorm(10)
s1d.interval(sc1, sc2, method = "bars")
s1d.interval(sc1, sc2, method = "area")
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/ADEg.C1-class.Rd 0000644 0001762 0000144 00000010116 13742303021 015665 0 ustar ligges users \name{ADEg.C1-class}
\docType{class}
\alias{ADEg.C1}
\alias{ADEg.C1-class}
\alias{panelbase,ADEg.C1-method}
\alias{gettrellis,ADEg.C1-method}
\alias{prepare,ADEg.C1-method}
\alias{setlatticecall,ADEg.C1-method}
\title{Class \code{ADEg.C1}
}
\description{
An object of \code{ADEg.C1} class represents unidimensional data into two dimensions.
The \code{ADEg.C1} class is a virtual class, i.e. a class which is not possible to create objects but which have heirs.
This class inherits from \code{ADEg} class and
has three son classes : \code{C1.barchart}, \code{C1.curve}, \code{C1.density}, \code{C1.dotplot}, \code{C1.gauss},
\code{C1.hist}, \code{C1.interval}
}
\section{Objects from the Class}{
None object of this class can be instantiated.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list of two elements to create the \code{trellis} object:
\itemize{
\item{\code{graphictype}: \code{xyplot}}
\item{\code{arguments}: its parameters to obtain the \code{trellis} object}
}}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{hori.update}: a logical indicating if the sense of direction of the graphics is updating}
\item{\code{backgrid}: a list of two elements for grid lines. \code{backgrid$x} defines the coordinates
of the lines (horizontal or vertical depending on the graphics orientation) and \code{backgrid$d} the grid mesh}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg}}, directly.
}
\section{Methods}{
\describe{
\item{prepare}{\code{signature(object = "ADEg.C1")}:
performs the calculations before display the object (e.g. limits, grid and axis calculations)}
\item{setlatticecall}{\code{signature(object = "ADEg.C1")}:
prepares the \code{lattice.call} slot}
\item{panelbase}{\code{signature(object = "ADEg.C1")}:
defines the graphical background (e.g. grid, rugs and box)}
\item{gettrellis}{\code{signature(object = "ADEg.C1")}:
converts the graphic into a \code{trellis} object of \code{lattice} class}
}
}
\note{
The \code{ADEg.S1} class and \code{ADEg.C1} class are both used to represent an unidimensional information (e.g. a score).
The difference between these two classes is mainly ideological : an \code{ADEg.S1} object is a representation into one
dimension (e.g. one line) while an \code{ADEg.C1} object is a representation into two dimensions (e.g. curves).
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\link{adegpar}}
\code{\linkS4class{C1.barchart}}
\code{\linkS4class{C1.curve}}
\code{\linkS4class{C1.density}}
\code{\linkS4class{C1.dotplot}}
\code{\linkS4class{C1.gauss}}
\code{\linkS4class{C1.hist}}
\code{\linkS4class{C1.interval}}
\code{\linkS4class{ADEg}}
}
\examples{
showClass("ADEg.C1")
}
\keyword{classes}
adegraphics/man/S2.class-class.Rd 0000644 0001762 0000144 00000010271 13742303021 016255 0 ustar ligges users \name{S2.class-class}
\docType{class}
\alias{S2.class-class}
\alias{S2.class}
\alias{prepare,S2.class-method}
\alias{panel,S2.class-method}
\title{Class \code{S2.class}}
\description{
A class for group representation in bi-dimensional plot.
}
\section{Objects from the Class}{
\code{S2.class} objects can be created by calls of the form \code{new("S2.class", ...)}.
The regular usage in this package is to use the \code{s.class} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
\item{\code{fac}: a factor (or a matrix of factors) splitting the rows of \code{dfxy}.}
\item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
\item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
\item{\code{wt}: a vector of weights for \code{fac}.}
\item{\code{labels}: a vector containing the class' labels.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
The specific slots for \code{S2.class} objects are: \itemize{
\item{\code{ellipseSize}: a positive number for ellipse size.}
\item{\code{starSize}: a number between 0 and 1 for star size.}
\item{\code{chullSize}: \code{NULL} or a vector of numbers between 0 and 1 for the convex hulls.}
\item{\code{col}: a logical or a vector of colors that apply to points, ellipses, labels, lines and polygons.}
}}
\item{\code{stats}}{a list of internal preliminary calculations.
The specific slots for \code{S2.class} objects are: \itemize{
\item{\code{means}: a matrix containing the weighted mean calculated for each \code{fac} value.}
\item{\code{covvar}: a list containing the weighted variance-covariance matrices calculated for each \code{fac} value.}
}}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{ellipses}: ellipses' coordinates.}
\item{\code{chullcoord}: convex hulls' coordinates.}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S2}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S2.class} are:
\describe{
\item{prepare}{\code{signature(object = "S2.class")}:
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by
default and calculates ellipses, convex hulls and centroids.}
\item{panel}{\code{signature(object = "S2.class")}:
draws ellipses, convex hulls, stars, labels and points.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S2}}
\code{\link{s.class}}
}
\examples{
showClass("S2.class")
}
\keyword{classes}
adegraphics/man/triangle.class.Rd 0000644 0001762 0000144 00000006336 13742303021 016502 0 ustar ligges users \name{triangle.class}
\alias{triangle.class}
\title{Ternary plot with a partition in classes (levels of a factor)}
\description{
This function represents a three dimensional scatter plot with a partition in classes (levels of a factor).
}
\usage{
triangle.class(dfxyz, fac, wt = rep(1, NROW(fac)), labels = levels(fac),
col = NULL, ellipseSize = 1, starSize = 1, chullSize = NULL, adjust = TRUE,
min3d = NULL, max3d = NULL, showposition = TRUE, facets = NULL, plot = TRUE,
storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dfxyz}{a three columns data frame used to produce the plot}
\item{fac}{a factor (or a matrix of factors) splitting the rows of \code{dfxyz}}
\item{wt}{a vector of weights for \code{fac}}
\item{labels}{a character vector containing the class' labels}
\item{col}{a logical, a color or a colors vector to color points, ellipses, labels, lines and polygons}
\item{ellipseSize}{a positive number for ellipse size}
\item{starSize}{a number between 0 and 1 for the size of the stars segments joining the stars' center
(centroids) and the matching points}
\item{chullSize}{\code{NULL} or a vector of numbers between 0 and 1 for the fraction of points included in the convex hull}
\item{adjust}{a logical to adjust the device with the limits of the smaller equilateral triangle containing the values}
\item{min3d}{a vector of three values for triangular minimal limits}
\item{max3d}{a vector of three values for triangular maximal limits}
\item{showposition}{a logical indicating whether the used triangle should be shown in the complete one}
\item{facets}{a factor splitting the rows of \code{dfxyz} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{Tr.class}) or \code{ADEgS} (if \code{showposition} is TRUE,
if \code{add} is \code{TRUE} and/or if facets are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{Tr.class}}
\code{\linkS4class{ADEg.Tr}}
}
\examples{
data(euro123, package = "ade4")
fac1 <- euro123$plan$an
df1 <- rbind.data.frame(euro123$in78, euro123$in86, euro123$in97)
triangle.class(df1, fac = fac1, showposition = TRUE, col = c(1, 2, 3))
triangle.class(df1, fac = fac1, showposition = FALSE, plabels.cex = 0, col = c(1, 2, 3),
key = list(space = "left"))
}
\keyword{hplot}
\keyword{aplot}
adegraphics/man/Tr.traject-class.Rd 0000644 0001762 0000144 00000007210 13742303021 016704 0 ustar ligges users \name{Tr.traject-class}
\docType{class}
\alias{Tr.traject}
\alias{Tr.traject-class}
\alias{prepare,Tr.traject-method}
\alias{panel,Tr.traject-method}
\title{Class \code{Tr.traject}}
\description{
A class for the creation and display of triangular plot with trajectories linking the points.
}
\section{Objects from the Class}{
\code{Tr.traject} objects can be created by calls of the form \code{new("Tr.traject", ...)}.
The regular usage in this package is to use the \code{triangle.traject} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxyz}: the displayed values in the form of a three columns data frame, a name or a matching call.}
\item{\code{fac}: a factor (or a matrix of factors) splitting the rows of \code{dfxyz}.}
\item{\code{labels}: a vector of character strings containing the trajectories' labels.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.Tr} class.
The specific slots for \code{Tr.traject} objects are: \itemize{
\item{\code{max3d} and \code{min3d}: vectors of three values for triangular maximal and minimal limits.}
\item{\code{adjust}: a logical to adjust the device with the limits of the smaller equilateral triangle containing the values}
\item{\code{order}: a vector containing the drawing order of the trajectories. A vector of length equal to factor.}
\item{\code{col}: a \code{NULL} value, a color or a colors vector to color points, labels and lines.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.Tr}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.Tr}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.Tr}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.Tr}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.Tr"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{Tr.traject} are:
\describe{
\item{prepare}{\code{signature(object = "Tr.traject")}:
calls the parent method (\code{prepare} for \code{ADEg.Tr}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "Tr.traject")}:
draws arrows, labels and points.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.Tr}}
\code{\link{triangle.traject}}
}
\examples{
showClass("Tr.traject")
}
\keyword{classes}
adegraphics/man/s1d.boxplot.Rd 0000644 0001762 0000144 00000005227 13742303021 015744 0 ustar ligges users \name{s1d.boxplot}
\alias{s1d.boxplot}
\title{1-D box plot of a numeric score partitioned in classes (levels of a factor)}
\description{
This function represents the link between a variable and a set of qualitative variables using box-and-whisker plots.
}
\usage{
s1d.boxplot(score, fac = gl(1, NROW(score)), at = 1:nlevels(fac), col = NULL,
facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{score}{a numeric vector (or a data frame) used to produce the plot}
\item{fac}{a factor (or a matrix of factors) to split \code{score}}
\item{at}{a numeric vector used as an index}
\item{col}{a color or a colors vector for points, labels, lines and polygons according to their factor level.
Colors are recycled whether there are not one color by factor level.}
\item{facets}{a factor splitting \code{score} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Graphical parameters for rugs are available in \code{plines} of \code{adegpar} and the ones for boxes in \code{ppolygons}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\value{
An object of class \code{ADEg} (subclass \code{S1.boxplot}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or data frame for \code{score} or data frame for \code{fac} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S1.boxplot}}
\code{\linkS4class{ADEg.S1}}
}
\examples{
data(banque, package = "ade4")
banque.acm <- ade4::dudi.acm(banque, scan = FALSE, nf = 4)
s1d.boxplot(banque.acm$l1[, 1], banque[, 2], psub.text = names(banque)[2],
psub.position = "topleft", col = c("red", "blue", "green", "purple", "orange"))
s1d.boxplot(banque.acm$l1[,1], banque[, 1:6], psub.position = "topleft")
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/prepare-methods.Rd 0000644 0001762 0000144 00000015341 13742303021 016664 0 ustar ligges users \name{prepare-methods}
\docType{methods}
\alias{prepare-methods}
\alias{prepare}
\title{Methods \code{prepare} for \code{ADEg} objects}
\description{
The method \code{prepare} performs the first calculus needed for the display.
}
\section{Methods}{
\describe{
\item{\code{signature(object = "ADEg.C1")}}{
performs the calculations before display the object (e.g. limits, grid and axis calculations)}
\item{\code{signature(object = "C1.barchart")}}{
calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "C1.curve")}}{
calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "C1.density")}}{
calls the parent method (\code{prepare} for \code{ADEg.C1}), modifies some graphical parameters used by default and
calculates the density curves according to the numeric score and the values' categories}
\item{\code{signature(object = "C1.dotplot")}}{
calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "C1.gauss")}}{
calls the parent method (\code{prepare} for \code{ADEg.C1}), modifies some graphical parameters used by default and
calculates the Gauss curves according to the numeric score and the values' categories (using weighted mean and standard deviation)}
\item{\code{signature(object = "C1.hist")}}{
calls the parent method (\code{prepare} for \code{ADEg.C1}), modifies some graphical parameters used by default
and calculates the boundaries and the height of cells}
\item{\code{signature(object = "C1.interval")}}{
calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "ADEg.S1")}}{
performs the calculations before display the object (e.g. limits, grid and axis calculations)}
\item{\code{signature(object = "S1.boxplot")}}{
calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "S1.class")}}{
calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "S1.distri")}}{
calls the parent method (\code{prepare} for \code{ADEg.S1}), modifies some graphical parameters used by default and calculates weighted mean and standard deviation}
\item{\code{signature(object = "S1.label")}}{
calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "S1.match")}}{
calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "ADEg.S2")}}{
performs the calculations before display the object (e.g. limits, grid and axis calculations)}
\item{\code{signature(object = "S2.arrow")}}{
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates limits}
\item{\code{signature(object = "S2.class")}}{
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates ellipses, convex hulls and centroids}
\item{\code{signature(object = "S2.corcircle")}}{
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and prepares the drawn grid}
\item{\code{signature(object = "S2.density")}}{
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates densities}
\item{\code{signature(object = "S2.distri")}}{
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates ellipses and centroids}
\item{\code{signature(object = "S2.image")}}{
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates grid expansion and limits}
\item{\code{signature(object = "S2.label")}}{
calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "S2.logo")}}{
calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "S2.match")}}{
calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "S2.traject")}}{
calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "S2.value")}}{
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates limits}
\item{\code{signature(object = "ADEg.T")}}{
performs the calculations before display the object (e.g. limits, grid and axis calculations)}
\item{\code{signature(object = "T.image")}}{
calls the parent method (\code{prepare} for \code{ADEg.T}) and modifies some graphical parameters used by default and calculates limits and grid}
\item{\code{signature(object = "T.value")}}{
calls the parent method (\code{prepare} for \code{ADEg.T}) and modifies some graphical parameters used by default and calculates limits and grid}
\item{\code{signature(object = "ADEg.Tr")}}{
performs the calculations before display the object (e.g. limits, grid and axis calculations)}
\item{\code{signature(object = "Tr.class")}}{
calls the parent method (\code{prepare} for \code{ADEg.Tr}), modifies some graphical parameters used by default and calculated ellipses, convex hulls and centroids}
\item{\code{signature(object = "Tr.label")}}{
calls the parent method (\code{prepare} for \code{ADEg.Tr}) and modifies some graphical parameters used by default}
\item{\code{signature(object = "Tr.match")}}{
calls the parent method (\code{prepare} for \code{ADEg.Tr}), modifies some graphical parameters used by default and defines the mean point and the axis}
\item{\code{signature(object = "Tr.traject")}}{
calls the parent method (\code{prepare} for \code{ADEg.Tr}) and modifies some graphical parameters used by default}
}}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\keyword{methods}
adegraphics/man/s.class.Rd 0000644 0001762 0000144 00000011050 13742303021 015124 0 ustar ligges users \name{s.class}
\alias{s.class}
\title{2-D scatter plot with a partition in classes (levels of a factor)}
\description{
This function represents a two dimensional scatter plot grouping points to the same class.
Classes are represented by ellipses, stars and/or convex hulls.
}
\usage{
s.class(dfxy, fac, xax = 1, yax = 2, wt = rep(1, NROW(fac)), labels = levels(fac),
ellipseSize = 1.5, starSize = 1, chullSize = NULL, col = NULL, facets = NULL,
plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dfxy}{a data frame used to produce the plot}
\item{fac}{a factor (or a matrix of factors) splitting the rows of \code{dfxy}}
\item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
\item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
\item{wt}{a vector of weights for \code{fac}}
\item{labels}{a character vector containing the class' labels}
\item{ellipseSize}{a positive number for ellipse size}
\item{starSize}{a number between 0 and 1 for the size of the stars segments joining the stars' center
(centroids) and the matching points}
\item{chullSize}{\code{NULL} or a vector of numbers between 0 and 1 for the fraction of points included in the convex hull}
\item{col}{a color or a colors vector to color points, ellipses, labels, lines and polygons}
\item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Graphical parameters for ellipses, stars and convex hulls are available in \code{pellipses}, \code{plines} and \code{ppolygons} of \code{adegpar}.
}
\value{
An object of class \code{ADEg} (subclass \code{S2.class}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or multidimensional \code{fac} or vectors for \code{xax}/\code{yax} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S2.class}}
\code{\linkS4class{ADEg.S2}}
}
\examples{
xy <- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -1, 1))
posi <- factor(xy$x > 0) : factor(xy$y > 0)
coul <- c("black", "red", "green", "blue")
s.class(xy, fac = posi, col = coul, psub.text = "example s.class", pellipses.col = coul)
s.class(xy, fac = posi, ppoints.cex = 1.5, ellipseSize = 0, starSize = 0,
ppolygons = list(border = 4:1, col = 1:4, lty = 1:4, lwd = 2, alpha = 0.4),
chullSize = c(1, 0.5))
s.class(xy, fac = posi, facets = posi, ppoints.cex = 1.5, ellipseSize = 0, starSize = 0,
ppolygons = list(border = 4:1, col = 1:4, lty = 1:4, lwd = 2, alpha = 0.4),
chullSize = c(1, 0.5))
\dontrun{
s.class(xy, fac = posi, col = coul, psub.text = "example s.class", pellipses.col = coul,
plabels.cex = 0, key = list(space = "left"))
data(banque, package = "ade4")
dudi1 <- ade4::dudi.acm(banque, scannf = FALSE)
col <- rainbow(length(levels(banque[, 20])))
g1 <- s.label(dudi1$li, psub = list(text = "Factorial map from ACM", cex = 1.5,
position = "topleft"), plot = FALSE)
g2 <- s.class(dudi1$li, banque[, 20], psub = list(text = names(banque)[20], cex = 1.5,
position = "bottomright"), ellipseSize = 0, starSize = 0.5, pgrid.text.cex = 0, plot = FALSE)
g3 <- s.class(dudi1$li, banque[, 20], starSize = 0, ellipseSize = 2, pgrid.text.cex = 0,
plabels.cex = 1.5, plot = FALSE)
g4 <- s.class(dudi1$li, banque[, 20], psub = list(text = names(banque)[20],
position = "topright"), pgrid.text.cex = 0, col = col, pellipses.lwd = 1.5, plot = FALSE)
G1 <- ADEgS(c(g1, g2, g3, g4), layout = c(2, 2))
G2 <- s.class(dudi1$li, banque, psub = list(position = "topleft"), pgrid.text.cex = 0,
starSize = 0, ppoints.cex = 0)
}
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/s1d.distri.Rd 0000644 0001762 0000144 00000006755 13742303021 015562 0 ustar ligges users \name{s1d.distri}
\alias{s1d.distri}
\title{1-D plot of a numeric score by means/standard deviations computed
using an external table of weights}
\description{
This function represents a set of distributions on a numeric score using a mean-standard deviation display
}
\usage{
s1d.distri(score, dfdistri, labels = colnames(dfdistri), at = 1:NCOL(dfdistri),
yrank = TRUE, sdSize = 1, facets = NULL, plot = TRUE,
storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{score}{a numeric vector (or a data frame) used to produce the plot}
\item{dfdistri}{a data frame containing the mass distribution in which each column is a class}
\item{yrank}{a logical to draw the distributions sorted by means ascending order}
\item{labels}{the labels' names drawn for each distribution}
\item{at}{a numeric vector used as an index}
\item{sdSize}{a numeric for the size of the standard deviation segments}
\item{facets}{a factor splitting \code{score} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Graphical parameters for rugs are available in \code{plines} of \code{adegpar}.
Some appropriated graphical parameters in \code{p1d} are also available.
The weighted means and standard deviations of class are available in the object slot \code{stats} using \code{object@stats$means} and \code{object@stats$sds}.
}
\value{
An object of class \code{ADEg} (subclass \code{S1.distri}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or data frame for \code{score} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S1.distri}}
\code{\linkS4class{ADEg.S1}}
}
\examples{
w <- seq(-1, 1, le = 200)
distri <- data.frame(lapply(1:50,
function(x) sample(200:1) * ((w >= (- x / 50)) & (w <= x / 50))))
names(distri) <- paste("w", 1:50, sep = "")
g11 <- s1d.distri(w, distri, yrank = TRUE, sdS = 1.5, plot = FALSE)
g12 <- s1d.distri(w, distri, yrank = FALSE, sdS = 1.5, plot = FALSE)
G1 <- ADEgS(c(g11, g12), layout = c(1, 2))
data(rpjdl, package = "ade4")
coa1 <- ade4::dudi.coa(rpjdl$fau, scannf = FALSE)
G2 <- s1d.distri(coa1$li[,1], rpjdl$fau, labels = rpjdl$frlab,
plabels = list(cex = 0.8, boxes = list(draw = FALSE)))
\dontrun{
g31 <- s1d.distri(coa1$l1[,1], rpjdl$fau, plabels = list(cex = 0.8, boxes = list(draw = FALSE)),
plot = FALSE)
nsc1 <- ade4::dudi.nsc(rpjdl$fau, scannf = FALSE)
g32 <- s1d.distri(nsc1$l1[,1], rpjdl$fau, plabels = list(cex = 0.8, boxes = list(draw = FALSE)),
plot = FALSE)
g33 <- s.label(coa1$l1, plot = FALSE)
g34 <- s.label(nsc1$l1, plot = FALSE)
G3 <- ADEgS(c(g31, g32, g33, g34), layout = c(2, 2))
}
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/s.traject.Rd 0000644 0001762 0000144 00000005703 13742303021 015463 0 ustar ligges users \name{s.traject}
\alias{s.traject}
\title{2-D scatter plot with trajectories}
\description{
This function represents a two dimensional scatter plot with trajectories.
}
\usage{
s.traject(dfxy, fac = gl(1, nrow(dfxy)), order, labels = levels(fac),
xax = 1, yax = 2, col = NULL, facets = NULL, plot = TRUE,
storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dfxy}{a data frame used to produce the plot}
\item{fac}{a factor (or a matrix of factors) splitting the rows of \code{dfxy}}
\item{order}{a vector containing the drawing order of the trajectories. A vector of length equal to factor.}
\item{labels}{a vector of character strings containing the trajectories' labels}
\item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
\item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
\item{col}{a color or a colors vector to color points, labels and lines}
\item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
The \code{fac} factor is used to display several trajectories: each level of \code{fac} is a specific trajectory.
}
\value{
An object of class \code{ADEg} (subclass \code{S2.traject}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or multidimensional \code{fac} or vectors for \code{xax}/\code{yax} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S2.traject}}
\code{\linkS4class{ADEg.S2}}
}
\examples{
rw <- function(a) {
x <- 0
for(i in 1:49) x <- c(x, x[length(x)] + runif(1, -1, 1))
x
}
x1 <- unlist(lapply(1:5, rw), use.names = FALSE)
y1 <- unlist(lapply(1:5, rw), use.names = FALSE)
z1 <- gl(5, 50)
g1 <- s.traject(data.frame(x1, y1), z1, ppoints.pch = 19:23, plines.col = rainbow(5))
x2 <- unlist(lapply(1:2, rw), use.names = FALSE)
y2 <- unlist(lapply(1:2, rw), use.names = FALSE)
z2 <- gl(2, 50)
g2 <- s.traject(data.frame(x2, y2), z2, ppoints.pch = 21:20, plines.col = 1:2)
}
\keyword{hplot}
\keyword{aplot}
adegraphics/man/s1d.hist.Rd 0000644 0001762 0000144 00000004677 13742303021 015234 0 ustar ligges users \name{s1d.hist}
\alias{s1d.hist}
\title{1-D plot of a numeric score by bars}
\description{
This function represents a score using a chart with rectangular bars.
}
\usage{
s1d.hist(score, breaks = NULL, nclass = round(log2(length(score)) + 1),
type = c("count", "density", "percent"), right = TRUE, facets = NULL,
plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{score}{a numeric vector (or a data frame) used to produce the plot}
\item{breaks}{a vector of values to split \code{score}. If \code{NULL}, \code{pretty(score, nclass)} is used.}
\item{nclass}{an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
\item{type}{a value among \code{count}, \code{density}, \code{percent} to indicate the unit of the cell height.}
\item{right}{a logical indicating if the histogram cells are right-closed (left open) intervals.}
\item{facets}{a factor splitting \code{score} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Graphical parameters for polygons are available in \code{ppolygons} of \code{adegpar}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\value{
An object of class \code{ADEg} (subclass \code{C1.hist}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or data frame for \code{score} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{C1.hist}}
\code{\linkS4class{ADEg.C1}}
\code{\link[graphics]{hist}}
}
\examples{
set.seed(40)
score1 <- rnorm(1000)
s1d.hist(score1)
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/C1.gauss-class.Rd 0000644 0001762 0000144 00000007762 13742303021 016264 0 ustar ligges users \name{C1.gauss-class}
\docType{class}
\alias{C1.gauss}
\alias{C1.gauss-class}
\alias{prepare,C1.gauss-method}
\alias{panel,C1.gauss-method}
\title{Class \code{C1.gauss}}
\description{
A class for the creation and display of a numeric score using gauss' curves.
}
\section{Objects from the Class}{
\code{C1.gauss} objects can be created by calls of the form \code{new("C1.gauss", ...)}.
The regular usage in this package is to use the \code{s1d.gauss} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
\item{\code{fac}: a factor for \code{score} splitting in the form of a vector, a factor, a name or a matching call.}
\item{\code{wt}: a vector of weights for \code{score}}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.
The specific slots for \code{C1.gauss} objects are: \itemize{
\item{\code{fill}: a logical to yield the gauss curves transparent.}
\item{\code{col}: a logical, a color or a colors vector to color labels, rugs, lines and polygons.}
\item{\code{steps}: a value for the number of segments used to draw Gauss curves.}
}}
\item{\code{stats}}{a list of internal preliminary calculations.
The specific slots for \code{C1.gauss} objects are: \itemize{
\item{\code{means}: the weighted mean calculated for each \code{fac} value.}
\item{\code{var}: the weighted variance calculated for each \code{fac} value.}
\item{\code{gausscurves}: the density gauss curve calculated for each \code{fac} value.}
}}
\item{\code{s.misc}}{a list of some others internal parameters.
The specific slot for \code{C1.gauss} objects is: \itemize{
\item{\code{rug}: an index value indicating where the rugs are drawn}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.C1}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{C1.gauss} are:
\describe{
\item{prepare}{\code{signature(object = "C1.gauss")}:
calls the parent method (\code{prepare} for \code{ADEg.C1}), modifies some graphical parameters used by default and
calculates the Gauss curves according to the numeric score and the values' categories (using weighted mean and standard deviation).}
\item{panel}{\code{signature(object = "C1.gauss")}:
draws Gauss curves and level names of each curve.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.C1}}
\code{\link{s1d.gauss}}
}
\examples{
showClass("C1.gauss")
}
\keyword{classes}
adegraphics/man/addsegment.Rd 0000644 0001762 0000144 00000005342 13742303021 015700 0 ustar ligges users \name{addsegment}
\alias{addsegment}
\alias{addsegment-methods}
\alias{addsegment,ADEg-method}
\alias{addsegment,ADEgS-method}
\title{
Adds segments on graphics.
}
\description{
Adds a \code{trellis} object containing one or several segments on one or several graphical objects.
}
\usage{
addsegment(object, x0 = NULL, y0 = NULL, x1, y1, plot = TRUE, ...)
}
\arguments{
\item{object}{an object of class \code{ADEg} or \code{ADEgS}
}
\item{x0, y0}{coordinates of points FROM which to draw, passed to
the \code{panel.segments} function of the \code{lattice} package. See Details.
}
\item{x1, y1}{coordinates of points TO which to draw, passed to the
\code{panel.segments} function of the \code{lattice} package. See Details.
}
\item{plot}{a logical indicating if the graphics is displayed
}
\item{\dots}{Other arguments. Additional graphical parameters (see the \code{plines} list in
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}}).
If \code{object} is an \code{ADEgS}, the argument \code{which} identify which
\code{ADEg} is/are used for superposition.
}
}
\value{
An object of class \code{ADEgS}.
}
\details{
\code{x0}, \code{y0}, \code{x1} and \code{y1} can be vectors. A line segment
is drawn, for each i, between the point (x0[i], y0[i]) and the point
(x1[i], y1[i]). The coordinate vectors will be recycled to the length of the longest.
}
\author{Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEgS}}
\code{\link[lattice]{panel.segments}}
}
\examples{
data(deug, package = "ade4")
g11 <- s1d.density(deug$tab[, 1], plot = FALSE)
g12 <- addsegment(g11, x0 = deug$cent[1], x1 = deug$cent[1], y0 = 0, y1 = 1,
plines = list(col = "grey30", lwd = 3))
g13 <- addsegment(g11,
x0 = deug$cent + seq(0, 1, length.out = length(deug$cent)),
x1 = deug$cent + seq(0, 1, length.out = length(deug$cent)),
y0 = 0, y1 = 1,
plines = list(col = 1:length(deug$cent), lty = 1:length(deug$cent)))
# 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%*%can1$xcoef[,1]
varcanoY <- dfY0%*%can1$ycoef[,1]
g21 <- s.label(cbind(varcanoY,varcanoX), labels = row.names(monde84), plabel.cex = 0.8,
plot = FALSE)
g22 <- addsegment(g21, -1.25, -1.25, 1.25, 1.25, plines.col = "purple", plines.lwd = 1.5,
plines.lty = 2)
}
\keyword{aplot}
adegraphics/man/S1.boxplot-class.Rd 0000644 0001762 0000144 00000006677 13742303021 016655 0 ustar ligges users \name{S1.boxplot-class}
\docType{class}
\alias{S1.boxplot}
\alias{S1.boxplot-class}
\alias{prepare,S1.boxplot-method}
\alias{panel,S1.boxplot-method}
\alias{setlatticecall,S1.boxplot-method}
\title{Class \code{S1.boxplot}}
\description{
A class for the representation of the link between a variable and a qualitative variable using box-and-whisker plots.
}
\section{Objects from the Class}{
\code{S1.boxplot} objects can be created by calls of the form \code{new("S1.boxplot", ...)}.
The regular usage in this package is to use the \code{s1d.boxplot} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
\item{\code{fac}: a factor for \code{score} splitting in the form of a vector, a factor, a name or a matching call.}
\item{\code{at}: the index value.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S1} class.
The specific slot for \code{S1.boxplot} objects is: \itemize{
\item{\code{col}: a \code{NULL} value, a color or a colors vector to color points, labels, lines and polygons.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S1}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S1}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S1}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S1}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S1"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S1.boxplot} are:
\describe{
\item{prepare}{\code{signature(object = "S1.boxplot")}:
calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "S1.boxplot")}:
draws box-and-wiskers diagrams, mean points and labels.}
\item{setlatticecall}{\code{signature(object = "S1.boxplot")}:
prepares the \code{lattice.call} slot}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S1}}
\code{\link{s1d.boxplot}}
}
\examples{
showClass("S1.boxplot")
}
\keyword{classes}
adegraphics/man/cbindADEg.Rd 0000644 0001762 0000144 00000003023 13742303021 015317 0 ustar ligges users \name{cbindADEg}
\alias{cbindADEg}
\alias{rbindADEg}
\alias{cbindADEg-methods}
\alias{rbindADEg-methods}
\alias{cbindADEg,ADEgORADEgSORtrellis,ADEgORADEgSORtrellis-method}
\alias{rbindADEg,ADEgORADEgSORtrellis,ADEgORADEgSORtrellis-method}
\title{Combine \code{ADEg} objects by columns or rows}
\description{
Take a sequence of \code{ADEg}, \code{ADEgS} or \code{trellis} arguments and combine by columns or rows, respectively.
}
\usage{
cbindADEg(g1, g2, ..., plot = FALSE)
rbindADEg(g1, g2, ..., plot = FALSE)
}
\arguments{
\item{g1}{an object of class \code{ADEg}, \code{ADEgS} or \code{trellis}}
\item{g2}{an object of class \code{ADEg}, \code{ADEgS} or \code{trellis}}
\item{...}{other objects of class \code{ADEg}, \code{ADEgS} or \code{trellis}}
\item{plot}{a logical indicating if the graphics is displayed}
}
\value{
an \code{ADEgS} object
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEgS}}
\code{\link{ADEgS}}
}
\examples{
data(jv73, package = "ade4")
pca1 <- ade4::dudi.pca(jv73$morpho, scannf = FALSE)
g1 <- s.label(pca1$li, plabels.optim = TRUE, plot = FALSE)
g2 <- s.class(pca1$li, jv73$fac.riv, starSize = 0, ellipseSize = 0, chullSize = 1,
ppolygons.alpha = 0.4, col = rainbow(12), ppoints.cex = 0, plot = FALSE)
g3 <- s.corcircle(pca1$co, pbackground.box = FALSE, plot = FALSE)
g4 <- rbindADEg(cbindADEg(g1, g2), cbindADEg(superpose(g1, g2), g3), plot = TRUE)
}
\keyword{hplot}
adegraphics/man/changelatticetheme.Rd 0000644 0001762 0000144 00000002247 13742303021 017404 0 ustar ligges users \name{changelatticetheme}
\alias{changelatticetheme}
\title{
Change the \code{lattice} theme used for \code{adegraphics}
}
\description{
This function allows to modify the default theme existing for \code{adegraphics} objects.
The created theme also affects previously created objects.
}
\usage{
changelatticetheme(...)
}
\arguments{
\item{\dots}{\code{lattice} parameters, the same used in \code{trellis.par.set} and provided by
\code{trellis.par.get}. If empty, reset the theme to the \code{adegraphics} one.}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\note{
The \code{adegraphics} theme removes all margins, sets a transparent background and grey regions.
A further development will be the creation of various themes for \code{adegraphics}.
}
\seealso{
\code{\link[lattice]{trellis.par.get}}
\code{\link[lattice]{trellis.par.set}}
\code{\link[lattice]{show.settings}}
}
\examples{
if(require(lattice, quietly = TRUE)) {
show.settings()
changelatticetheme(list(superpose.symbol = list(pch = c(21, 22, 35), cex = 1)))
show.settings()
show.settings()[1]
}
}
\keyword{iplot}
adegraphics/man/addline.Rd 0000644 0001762 0000144 00000004043 13742303021 015162 0 ustar ligges users \name{addline}
\alias{addline}
\alias{addline-methods}
\alias{addline,ADEg-method}
\alias{addline,ADEgS-method}
\title{
Adds lines on graphics.
}
\description{
Adds a \code{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{
\item{object}{an object of class \code{ADEg} or \code{ADEgS}
}
\item{a, b}{coefficients of the line to be added, passed to the \code{panel.abline}
function of the \code{lattice} package
}
\item{h, v}{numeric vectors giving locations respectively of horizontal and
vertical lines to be added to the plot, in native coordinates, passed to the
\code{panel.abline} function of the \code{lattice} package
}
\item{plot}{a logical indicating if the graphics is displayed
}
\item{\dots}{Other arguments. Additional graphical parameters (see the \code{plines} list in
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}}).
If \code{object} is an \code{ADEgS}, the argument \code{which} identify which
\code{ADEg} is/are used for superposition.
}
}
\value{
An object of class \code{ADEgS}.
}
\author{Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEgS}}
\code{\link[lattice]{panel.abline}}
}
\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%*%can1$xcoef[,1]
varcanoY <- dfY0%*%can1$ycoef[,1]
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)
}
\keyword{aplot}
adegraphics/man/S1.distri-class.Rd 0000644 0001762 0000144 00000007141 13742303021 016447 0 ustar ligges users \name{S1.distri-class}
\docType{class}
\alias{S1.distri}
\alias{S1.distri-class}
\alias{prepare,S1.distri-method}
\alias{panel,S1.distri-method}
\title{Class \code{S1.distri}}
\description{
A class for the representation of a set of distributions on a numeric score.
}
\section{Objects from the Class}{
\code{S1.distri} objects can be created by calls of the form \code{new("S1.distri", ...)}.
The regular usage in this package is to use the \code{s1d.distri} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
\item{\code{dfdistri}: the mass distribution in which each column is a class.}
\item{\code{labels}: the labels' names drawn for each distribution.}
\item{\code{at}: the index value.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S1} class.
The specific slots for \code{S1.distri} objects are: \itemize{
\item{\code{sdSize}: the size of the standard deviation segments.}
\item{\code{yrank}: a logical to draw the distributions sorted by means ascending order.}
}}
\item{\code{stats}}{a list of internal preliminary calculations.
The specific slots for \code{S1.distri} objects are: \itemize{
\item{\code{means}: the weighted mean calculated for each distribution.}
\item{\code{sds}: the weighted variance calculated for each distribution.}
}}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S1}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S1}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S1}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S1}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S1"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S1.distri} are:
\describe{
\item{prepare}{\code{signature(object = "S1.distri")}:
calls the parent method (\code{prepare} for \code{ADEg.S1}), modifies some graphical parameters used by default and calculates weighted mean and standard deviation.}
\item{panel}{\code{signature(object = "S1.distri")}:
draws mean points and segments with matching labels.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S1}}
\code{\link{s1d.distri}}
}
\examples{
showClass("S1.distri")
}
\keyword{classes}
adegraphics/man/S2.label-class.Rd 0000644 0001762 0000144 00000006155 13742303021 016235 0 ustar ligges users \name{S2.label-class}
\docType{class}
\alias{S2.label}
\alias{S2.label-class}
\alias{prepare,S2.label-method}
\alias{panel,S2.label-method}
\title{Class \code{S2.label}}
\description{
A class for creating and drawing bi-dimensional plot with point label.
}
\section{Objects from the Class}{
\code{S2.label} objects can be created by calls of the form \code{new("S2.label", ...)}.
The regular usage in this package is to use the \code{s.label} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
\item{\code{labels}: a vector of character strings for the points' labels}
\item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
\item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S2}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S2.label} are:
\describe{
\item{prepare}{\code{signature(object = "S2.label")}:
calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "S2.label")}:
draws points and labels.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S2}}
\code{\link{s.label}}
}
\examples{
showClass("S2.label")
}
\keyword{classes}
adegraphics/man/zoom.Rd 0000644 0001762 0000144 00000002431 13742303021 014545 0 ustar ligges users \name{zoom}
\alias{zoom}
\alias{zoom-methods}
\alias{zoom,ADEg.S1,numeric,missing-method}
\alias{zoom,ADEg.S1,numeric,numeric-method}
\alias{zoom,ADEg.S2,numeric,missing-method}
\alias{zoom,ADEg.S2,numeric,numeric-method}
\title{Zoom in or out}
\description{
This function performs a zoom on a \code{ADEg.S1} or \code{ADEg.S2} displayed object.
}
\usage{
zoom(object, zoom, center)
}
\arguments{
\item{object}{a \code{ADEg.S1} or \code{ADEg.S2} object}
\item{zoom}{a numeric value to zoom in (if \code{zoom} > 1) or out (if \code{zoom} < 1)}
\item{center}{a numeric value (if \code{object} is a \code{ADEg.S1} object) or a two-length vector (if \code{object} is a \code{ADEg.S2} object)
as a reference point to zoom (in or out). If it is \code{missing}, the displayed center point is used.}
}
\value{
Updated display after zoom.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg.S2}}
\code{\linkS4class{ADEg.S1}}
}
\examples{
data(olympic, package = "ade4")
dudi1 <- ade4::dudi.pca(olympic$tab, scan = FALSE)
g <- s.corcircle(dudi1$co, lab = names(olympic$tab), fullcircle = TRUE, psub.text = "data:olympic")
zoom(g, 0.5)
zoom(g, 2, center = c(-0.4, 0.8))
}
\keyword{iplot}
adegraphics/man/s1d.dotplot.Rd 0000644 0001762 0000144 00000004102 13742303021 015731 0 ustar ligges users \name{s1d.dotplot}
\alias{s1d.dotplot}
\title{1-D plot of a numeric score by dots}
\description{
This function represents a score using dots.
}
\usage{
s1d.dotplot(score, at = 1:NROW(score), facets = NULL, plot = TRUE,
storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{score}{a numeric vector (or a data frame) used to produce the plot}
\item{at}{a numeric vector used as an index}
\item{facets}{a factor splitting \code{score} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Graphical parameters for segments and dots are available in \code{plines} and in \code{ppoints} of \code{adegpar}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\value{
An object of class \code{ADEg} (subclass \code{C1.dotplot}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or data frame for \code{score} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{C1.dotplot}}
\code{\linkS4class{ADEg.C1}}
}
\examples{
data(rpjdl, package = "ade4")
rpjdl.coa <- ade4::dudi.coa(rpjdl$fau, scannf = FALSE, nf = 4)
s1d.dotplot(rpjdl.coa$eig)
set.seed(40)
score1 <- rnorm(10)
s1d.dotplot(score1)
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/getcall-methods.Rd 0000644 0001762 0000144 00000001142 13742303021 016633 0 ustar ligges users \name{getcall-methods}
\docType{methods}
\alias{getcall-methods}
\alias{getcall}
\title{Method for \code{ADEg} and \code{ADEgS} objects}
\description{
\code{getcall} returns the call used to create the object.
}
\section{Methods}{
\describe{
\item{\code{signature(object = "ADEg")}}{
returns the slot \code{Call} of the object \code{ADEg}}
\item{\code{signature(object = "ADEgS")}}{
returns the slot \code{Call} of the object \code{ADEgS}}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\keyword{methods}
adegraphics/man/C1.dotplot-class.Rd 0000644 0001762 0000144 00000005624 13742303021 016622 0 ustar ligges users \name{C1.dotplot-class}
\docType{class}
\alias{C1.dotplot}
\alias{C1.dotplot-class}
\alias{prepare,C1.dotplot-method}
\alias{panel,C1.dotplot-method}
\title{Class \code{C1.dotplot}}
\description{
A class for the creation and display of a numeric score using dots.
}
\section{Objects from the Class}{
\code{C1.dotplot} objects can be created by calls of the form \code{new("C1.dotplot", ...)}.
The regular usage in this package is to use the \code{s1d.dotplot} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a vector, a factor, a name or a matching call.}
\item{\code{at}: the index value.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.C1}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{C1.dotplot} are:
\describe{
\item{prepare}{\code{signature(object = "C1.dotplot")}:
calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "C1.dotplot")}:
draws segments and dots.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.C1}}
\code{\link{s1d.dotplot}}
}
\examples{
showClass("C1.dotplot")
}
\keyword{classes}
adegraphics/man/s1d.barchart.Rd 0000644 0001762 0000144 00000004431 13742303021 016037 0 ustar ligges users \name{s1d.barchart}
\alias{s1d.barchart}
\title{1-D plot of a numeric score by bars}
\description{
This function represents a score using a chart with rectangular bars for which length is proportional to this score.
}
\usage{
s1d.barchart(score, labels = NULL, at = 1:NROW(score), sort = FALSE,
facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{score}{a numeric vector (or a data frame) used to produce the plot}
\item{labels}{the labels' names drawn on the top of bars}
\item{at}{a numeric vector used as an index}
\item{sort}{a logical indicating if \code{score} is sorted in ascending order}
\item{facets}{a factor splitting \code{score} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Graphical parameters for bars are available in \code{ppolygons} of \code{adegpar}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\value{
An object of class \code{ADEg} (subclass \code{C1.barchart}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or data frame for \code{score} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{C1.barchart}}
\code{\linkS4class{ADEg.C1}}
}
\examples{
data(rpjdl, package = "ade4")
rpjdl.coa <- ade4::dudi.coa(rpjdl$fau, scannf = FALSE, nf = 4)
s1d.barchart(rpjdl.coa$eig, p1d.horizontal = FALSE, ppolygons.col = "grey")
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/adegpar.Rd 0000644 0001762 0000144 00000027744 13742303021 015202 0 ustar ligges users \name{adegpar}
\alias{adegpar}
\title{Handling ADEg graphical parameters}
\description{
\code{adegpar} can be used to set or query graphical parameters used in \code{ADEg} object display.
It is inspired by the \code{par} function of \code{graphics} package.
}
\usage{
adegpar(...)
}
\arguments{
\item{\dots}{
If it is empty, the return value is a named list containing all the current settings.
If it is a string of characters, the corresponding sub-list of parameters is return as information.
If it is a list containing keys and values, the corresponding changes in current settings are made.
}
}
\details{
The graphical parameters control apparency of the graphic.
Calls can be made using either a list of list (e.g. \code{plabels = list(col = "red")}) or a list grouping both keys with "." (e.g. \code{plabels.col = "red"}).
Parameters are re-used if needed in all \code{ADEg} object.
If set globally, meaning using \code{adegpar}, all created objects afterwards will be affected.
}
\value{
Several parameters are used to create complete plot and accessible through \code{adegpar}.
\describe{
\item{\code{p1d}:}{parameters for one-dimension graphic, object of class inherited from \code{"ADEg.S1"} or \code{"ADEg.C1"} \itemize{
\item{\code{horizontal}: a logical indicating if the plot is horizontal}
\item{\code{reverse}: a logical indicating if the bottom of the plot is at the bottom (for \code{horizontal} as \code{TRUE})
or at the left of the device (for \code{horizontal} as \code{FALSE}). If FALSE, the graphical display bottom is at the top
(for \code{horizontal} as \code{TRUE}) or at the right of the device (for \code{horizontal} as \code{FALSE}).}
\item{\code{rug}: a list dedicated to tick marks \itemize{
\item{\code{draw}: a logical indicating if the rugs are drawn}
\item{\code{tck}: size of the rug (ticks) in proportion from the reference line and the origin of the device (0.5 by default)}
\item{\code{margin}: where to draw the reference line (0.07 by default)}
\item{\code{line}: a logical indicating if the reference line is drawn using \code{porigin} arguments}
}}
}}
\item{\code{parrows}:}{arrows' parameters. see \code{panel.arrows} for more information \itemize{
\item{\code{angle}: angle from the shaft of the arrow to the edge of the arrow head}
\item{\code{ends}: kind of arrows to be drawn. Can be \code{first}, \code{last} or \code{both}}
\item{\code{length}: length of the edges of the arrow head}
}}
\item{\code{paxes}:}{axis' parameters. Mostly inspired by \code{xyplot} function of \code{lattice} package \itemize{
\item{\code{aspectratio}: a character string to control physical aspect ratio of the graphic (drawing panel more specifically).
\code{iso} for isometric scales, \code{fill} for drawing as big as possible or \code{xy} for banking rule}
\item{\code{draw}: a logical indicating if axis (tick marks and labels) are drawn around the graphic}
\item{\code{x}: a list used for the creation of x-axis in the \code{trellis} object. See \code{xyplot} for more information \itemize{
\item{\code{draw}: a logical indicating if x-axis (tick marks and labels) are drawn around the graphic}
}}
\item{\code{y}: the same list as for \code{x} with \code{draw} parameters}
}}
\item{\code{pbackground}:}{background's parameters \itemize{
\item{\code{col}: background color}
\item{\code{box}: a logical indicating if a box is drawn surrounding the plot}
}}
\item{\code{pellipses}:}{ellipses' drawing parameters \itemize{
\item{\code{alpha}: a value between 0 and 1 controlling ellipses' background transparency}
\item{\code{axes}: a list dedicated to ellipses' axis \itemize{
\item{\code{draw}: a logical indicating whether ellipses' axis are drawn}
\item{\code{col}: ellipses' axis color}
\item{\code{lty}: line type of ellipses' axis}
\item{\code{lwd}: line width of ellipses' axis}
}}
\item{\code{border}: ellipses's border color}
\item{\code{lty}: line type of ellipses' border}
\item{\code{lwd}: line width of ellipses' border}
\item{\code{col}: ellipses' background color}
}}
\item{\code{pgrid}:}{grid's drawing parameters \itemize{
\item{\code{draw}: a logical indicating if grid is drawn in the background}
\item{\code{col}: grid's line color}
\item{\code{lty}: line type of grid line}
\item{\code{lwd}: line width of grid line}
\item{\code{nint}: an integer indicating the number of grid intervals expected}
\item{\code{text}: a list dedicated to grid legend text\itemize{
\item{\code{cex}: text size of grid legend}
\item{\code{col}: text color of grid legend}
\item{\code{pos}: a character string (\code{topright}, \code{topleft}, \code{bottomleft}, \code{bottomright}) or a vector of length 2
indicating text position of grid legend. If it is a vector, the default unit is \code{npc} (normalized parent coordinates).}
}}
}}
\item{\code{plabels}:}{labels' drawing parameters \itemize{
\item{\code{alpha}: a value between 0 and 1 controlling label transparency}
\item{\code{cex}: labels' text size}
\item{\code{col}: labels' text color}
\item{\code{srt}: labels' text orientation. It can be \code{horizontal}, \code{vertical} or an angle indication in degrees}
\item{\code{optim}: a logical indicating if an algorithm is used to avoid labels' overlapping or outside limits}
\item{\code{boxes}: label's boxes parameters \itemize{
\item{\code{draw}: a logical indicating if labels are framed}
\item{\code{alpha}: a value between 0 and 1 controlling labels' boxes transparency}
\item{\code{border}: boxes' border color}
\item{\code{col}: boxes' background color}
\item{\code{lty}: line type of boxes' border}
\item{\code{lwd}: line width of boxes' border}
}}
}}
\item{\code{plegend}:}{legend's drawing parameters (used for object of class inherited from \code{T.value} and \code{S2.value}) \itemize{
\item{\code{drawKey}: a logical indicating if the legend should
be drawn. Legend can be provided by the \code{key} argument or
is automatically generated for \code{*.class} and \code{*.value}
functions}
\item{\code{drawColorKey}: a logical indicating if the color
legend should be drawn (only for \code{*.image} functions)}
\item{\code{size}: size of the legend}
}}
\item{\code{plines}:}{lines' drawing parameters \itemize{
\item{\code{col}: lines color}
\item{\code{lty}: lines type}
\item{\code{lwd}: lines width}
}}
\item{\code{pnb}:}{drawing parameters for neighbourhood graph \itemize{
\item{\code{edge}: edge's drawing parameters \itemize{
\item{\code{col}: edge color}
\item{\code{lty}: line type of edge}
\item{\code{lwd}: line width of edge}
}}
\item{\code{node}: node's drawing parameters \itemize{
\item{\code{pch}: node's symbol type}
\item{\code{cex}: node's symbol size}
\item{\code{col}: node's symbol color}
\item{\code{alpha}: a value between 0 and 1 controlling node's symbol transparency}
}}
}}
\item{\code{porigin}:}{drawing parameters for origin's lines. See \code{panel.lines} for more information \itemize{
\item{\code{draw}: a logical indicating if vertical and horizontal lines are drawn to indicate origin}
\item{\code{include}: a logical indicating if origin is included in the drawing limits}
\item{\code{origin}: a two-length vector indicating origin coordinates}
\item{\code{alpha}: a value between 0 and 1 controlling origin's lines transparency}
\item{\code{col}: color of origin's lines}
\item{\code{lty}: origin's line type}
\item{\code{lwd}: origin's line width}
}}
\item{\code{ppalette}:}{a function taking one integer in argument indicating the number of expecting colors (for example using \code{colorRampPalette}) \itemize{
\item{\code{quanti}: \code{adegpar()$ppalette$quanti(n)} returns n colors shaded grey to white}
\item{\code{quali}: \code{adegpar()$ppalette$quali(n, name)} returns \code{n} differentiated colors. \code{name} argument is passed to the \code{brewer.pal} function
of the \code{RColorBrewer} package and must be \code{Accent}, \code{Dark2}, \code{Paired}, \code{Pastel1}, \code{Pastel2}, \code{Set1} (the default value), \code{Set2} or \code{Set3}.
When \code{n} is equal to 2, values for 'white' and 'black' colors are returned and can be not quite visible on the display.}
}}
\item{\code{ppoints}:}{points' drawing paameters \itemize{
\item{\code{alpha}: a value between 0 and 1 controlling points transparency}
\item{\code{cex}: points size}
\item{\code{col}: points color}
\item{\code{pch}: points type}
\item{\code{fill}: points' background color (only for filled points type)}
}}
\item{\code{ppolygons}:}{polygons' drawing parameters (used for example to draw convex hull for
\code{S2.class} or Gaussian curves for \code{C1.gauss} objects). See \code{lpolygon} for more information. \itemize{
\item{\code{border}: polygon's border color}
\item{\code{col}: polygon's background color}
\item{\code{lty}: line type of polygon border}
\item{\code{lwd}: line width of polygon border}
\item{\code{alpha}: a value between 0 and 1 controlling polygons' background transparency}
}}
\item{\code{pSp}:}{drawing parameters for spatial object \itemize{
\item{\code{col}: spatial object's background color}
\item{\code{border}: spatial object's border color}
\item{\code{lty}: line type of spatial object border}
\item{\code{lwd}: line width of spatial object border}
\item{\code{alpha}: a value between 0 and 1 controlling spatial object transparency}
}}
\item{\code{psub}:}{subtitle's drawing parameters \itemize{
\item{\code{cex}: text size of subtitle}
\item{\code{col}: text color of subtitle}
\item{\code{position}: a character string (\code{topright}, \code{topleft}, \code{bottomleft}, \code{bottomright}) or a vector of length 2
indicating text position of subtitle. If it is a vector, the default unit is \code{npc} (normalized parent coordinates).}
\item{\code{text}: the character string to display}
}}
\item{\code{ptable}:}{for table graphic, object of class inherited from \code{ADEg.T} \itemize{
\item{\code{x}: x-axis parameters \itemize{
\item{\code{srt}: text rotation}
\item{\code{pos}: position of the axis. It can be \code{top} or \code{bottom}. Otherwise axis and labels' axis are not drawn}
\item{\code{tck}: ticks size}
\item{\code{adj}: justification of labels}
}}
\item{\code{y}: same as \code{x} list, but for y-axis \itemize{
\item{\code{str}, \code{tck}, \code{adj}}
\item{\code{pos}: position of the axis. It can be \code{left} or \code{right}. Otherwise axis and labels' axis are not drawn}
}}
\item{\code{margin}: margin surrounding the drawing panel. The numbers indicate the \code{bottom}, \code{left}, \code{top} and \code{right} margins.
Results are obtained passing \code{margin} to padding argument in \code{lattice}. Please see
\code{layout.heights} and \code{layout.widths} parameters in \code{lattice} package for more information}
}}
}}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\link{par}}
}
\examples{
oldparamadeg <- adegpar()
X <- data.frame(x = runif(50, -1, 2), y = runif(50, -1, 2))
s.label(X)
names(adegpar())
adegpar("paxes.draw", "psub.cex")
adegpar()$pback$col
adegpar("paxes.draw" = TRUE, "psu.ce" = 3, "pback.col" = "grey85")
s.label(X)
adegpar(oldparamadeg)
}
\keyword{list}
\keyword{color}
adegraphics/man/s.density.Rd 0000644 0001762 0000144 00000006326 13742303021 015510 0 ustar ligges users \name{s.density}
\alias{s.density}
\title{2-D scatter plot with kernel density estimation}
\description{
This function represents a two dimensional scatter plot of points distribution.
Densities' representation is based on the \code{levelplot} graphic in \code{lattice}
(density's surface, filled with colors and/or contour lines).
}
\usage{
s.density(dfxy, xax = 1, yax = 2, bandwidth = NULL, gridsize = c(450L, 450L),
nrpoints = 300, threshold = 0.1, col = NULL, contour = FALSE, region = !contour,
nclass = 8, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dfxy}{a data frame used to produce the plot}
\item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
\item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
\item{bandwidth}{bandwidth for density calculations which is passed in parameters in the \code{bkde2D} function of the \code{KernSmooth} package}
\item{gridsize}{grid dimension}
\item{nrpoints}{number of points on the density image}
\item{threshold}{a value between 0 and 1 to draw densities greater than this threshold. No density is visible whether it is equal to 1}
\item{col}{a color or a colors vector to color densities}
\item{contour}{a logical to draw contour lines}
\item{region}{a logical to fill grid regions with \code{col}}
\item{nclass}{number of class for density}
\item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Density calculation is made using the \code{kde2d} function of the \code{KernSmooth} package.
}
\value{
An object of class \code{ADEg} (subclass \code{S2.density}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or vectors for \code{xax}/\code{yax} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S2.density}}
\code{\linkS4class{ADEg.S2}}
}
\examples{
xx2 <- c(rnorm(50000, 1, 1), rnorm(50000, -1, 1))
yy2 <- c(rnorm(50000, -1, 0.5), rnorm(50000, 1, 0.5))
s.density(cbind(xx2, yy2), paxes.draw = TRUE, gridsize = c(200, 200), region = TRUE,
contour = TRUE, plabels.cex = 0, threshold = 0.05, nclass = 3,
col = colorRampPalette(c("lightgrey", "black"))(100))
}
\keyword{hplot}
\keyword{aplot}
adegraphics/man/s1d.match.Rd 0000644 0001762 0000144 00000004324 13742303021 015346 0 ustar ligges users \name{s1d.match}
\alias{s1d.match}
\title{1-D plot of the matching between two numeric scores}
\description{
This function represents paired scores with evenly spaced labels.
}
\usage{
s1d.match(score1, score2, labels = 1:NROW(score1), at = 0.5,
facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE,
pos = -1, ...)
}
\arguments{
\item{score1}{a numeric vector (or a data frame) used to produce the plot}
\item{score2}{a numeric vector used to produce the plot with as many values as values (or rows) in \code{score1}}
\item{labels}{the labels' names drawn for each \code{score1} value}
\item{at}{a numeric vector used as an index}
\item{facets}{a factor splitting \code{score1} so that subsets % facets uniquement sur score1. quid de score2
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Graphical parameters for rugs are available in \code{plines} of \code{adegpar}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\value{
An object of class \code{ADEg} (subclass \code{S1.match}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or data frame for \code{score} or data frame for \code{fac} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S1.match}}
\code{\linkS4class{ADEg.S1}}
}
\examples{
s1d.match(-5:5, 2 * (-5:5))
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/ADEg-class.Rd 0000644 0001762 0000144 00000014072 13742303021 015430 0 ustar ligges users \name{ADEg-class}
\docType{class}
\alias{ADEg}
\alias{ADEg-class}
\alias{add.ADEg,ADEg-method}
\alias{getcall,ADEg-method}
\alias{getlatticecall}
\alias{getlatticecall,ADEg-method}
\alias{getparameters}
\alias{getparameters,ADEg-method}
\alias{getstats}
\alias{getstats-methods}
\alias{getstats,ADEg-method}
\alias{gettrellis}
\alias{gettrellis-methods}
\alias{gettrellis,ADEg-method}
\alias{panelbase}
\alias{panelbase-methods}
\alias{panelbase,ADEg-method}
\alias{printSuperpose,ADEgORtrellis,ADEgORtrellis-method}
\alias{plot,ADEg-method}
\alias{plot,ADEg,ANY-method}
\alias{print,ADEg-method}
\alias{show,ADEg-method}
\alias{update,ADEg}
\alias{update,ADEg-method}
\title{Class \code{ADEg}
}
\description{
An object of \code{ADEg} class is a simple graphic.
This object can be blended in with another one (superposition, insertion and/or juxtaposition) to
form a more complex graphics (an \code{ADEgS} object).
The \code{ADEg} class is a virtual class, i.e. a class which is not possible to create objects but which have heirs.
This class has five son classes : \code{ADEg.S1}, \code{ADEg.S2}, \code{ADEg.C1}, \code{ADEg.T} and \code{ADEg.Tr}.
}
\section{Objects from the Class}{
None object of this class can be instantiated.
}
\section{Slots}{
\describe{
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list of two elements to create the \code{trellis} object:
\itemize{
\item{\code{graphictype}: the \code{lattice} function to use}
\item{\code{arguments}: its parameters to obtain the \code{trellis} object}
}}
\item{\code{g.args}}{a list containing some parameters linked with the created object of \code{ADEg} class:
\itemize{
\item{\code{xlim}, \code{ylim}}
\item{\code{main}, \code{sub}}
\item{\code{xlab}, \code{ylab}}
\item{\code{samelimits}}
\item{\code{scales}: a list of scales informations (ticks, marks and labels for the x-axis or the y-axis)
in the form of the lattice argument \code{scales} in the \code{xyplot} function}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some other internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Methods}{
\describe{
\item{panelbase}{\code{signature(object = "ADEg")}: draws grid and text and produces graphical output
from the graphical object}
\item{getcall}{\code{signature(object = "ADEg")}: returns the \code{Call} slot}
\item{getlatticecall}{\code{signature(object = "ADEg")}: returns the \code{lattice.call} slot}
\item{getstats}{\code{signature(object = "ADEg")}: returns the \code{stats} slot}
\item{getparameters}{\code{signature(object = "ADEg", number)}:
if \code{number} is 1, returns the \code{trellis.par} slot,
if it is 2, returns the \code{adeg.par} slot
and if it is 0, returns the both slots}
\item{add.ADEg}{\code{signature(object = "ADEg")}: superposes an ADEg on the
current one plotted}
\item{+}{\code{signature(e1 = "ADEg", e2 = "ADEg")}: superposes e2 on e1}
\item{superpose}{\code{signature(g1 = "ADEgORtrellis", g2 = "ADEgORtrellis", which = "ANY", plot = "ANY")}:
creates a new \code{ADEgS} object performing a superposition of \code{g2} on \code{g1}.}
\item{printSuperpose}{\code{signature(g1 = "ADEgORtrellis", refg = "ADEgORtrellis")}:
internal method, not for users.}
\item{cbindADEg}{\code{signature(g1 = "ADEgORADEgS", g2 = "ADEgORADEgS")}:
creates a new \code{"ADEgS"} object combining \code{g1} on \code{g2}.}
\item{rbindADEg}{\code{signature(g1 = "ADEgORADEgS", g2 = "ADEgORADEgS")}:
creates a new \code{"ADEgS"} object combining \code{g1} on \code{g2} by rows.}
\item{insert}{\code{signature(graphics = "ADEgORtrellis", oldgraphics = "missing", posi, ratio, inset, plot, which)}:
creates a new \code{ADEgS} object performing an insertion of \code{graphics} into the current device.}
\item{insert}{\code{signature(graphics = "ADEgORtrellis", oldgraphics = "ADEg", posi, ratio, inset, plot)}:
creates a new \code{ADEgS} object performing an insertion of \code{graphics} into \code{oldgraphics}.}
\item{show}{\code{signature(x = "ADEg")}: prints the \code{ADEg} object}
\item{plot}{\code{signature(x = "ADEg")}: prints the \code{ADEg} object}
\item{print}{\code{signature(x = "ADEg")}: displays the \code{ADEg} object
in the current device or in a new one}
\item{update}{\code{signature(object = "ADEg")}: modifies graphical parameters after
the \code{ADEg} creation, updates the current display and returns the modified \code{ADEg}}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\note{
For any \code{ADEg} creation, various graphical parameters can be passed into the dots (...) arguments.
\itemize{
\item{the parameters listed in \code{adegpar()} can be changed, even if
some of them do no modify the graphic representation chosen.}
\item{the \code{lattice} parameters listed in \code{trellis.par.get()} can also be changed.}
\item{limits, main and sub title, and axes labels can be changed using the keys
\code{xlim}, \code{ylim}, \code{main}, \code{sub}, \code{xlab} and \code{ylab}.}
\item{a neighbouring graph (object of class \code{nb} or \code{listw}) and a spatial one (object of
class \code{sp}) can be display in the background using the keys \code{nbobject}, \code{Sp} and \code{sp.layout}.}
}
}
\seealso{
\code{\linkS4class{ADEgS}}
\code{\link{adegpar}}
\code{\link{superpose}}
\code{\link{insert}}
}
\examples{
showClass("ADEg")
}
\keyword{classes}
adegraphics/man/s.match.Rd 0000644 0001762 0000144 00000005333 13742303021 015122 0 ustar ligges users \name{s.match}
\alias{s.match}
\title{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{
\item{dfxy1}{a data frame, the first system of coordinates, used to produce the plot}
\item{dfxy2}{a data frame, the second system of coordinates, with as many rows as \code{dfxy1}, used to produce the plot.}
\item{labels}{a vector of character strings containing the matches' labels}
\item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
\item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
\item{arrows}{a logical to draw arrows}
\item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{S2.match}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or vectors for \code{xax}/\code{yax} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S2.match}}
\code{\linkS4class{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)
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/ADEg.Tr-class.Rd 0000644 0001762 0000144 00000007372 13742303021 016021 0 ustar ligges users \name{ADEg.Tr-class}
\docType{class}
\alias{ADEg.Tr}
\alias{ADEg.Tr-class}
\alias{gettrellis,ADEg.Tr-method}
\alias{prepare,ADEg.Tr-method}
\alias{setlatticecall,ADEg.Tr-method}
\alias{panelbase,ADEg.Tr-method}
\title{Class \code{"ADEg.Tr"}}
\description{
An object of \code{ADEg.Tr} class represents triangular coordinates in 2D.
The \code{ADEg.Tr} class is a virtual class, i.e. a class which is not possible to create objects but which have heirs.
This class inherits from \code{ADEg} class and
has three son classes : \code{Tr.class}, \code{Tr.label}, \code{T.match} and \code{T.traject}.
}
\section{Objects from the Class}{
None object of this class can be instantiated.
}
\section{Slots}{
\describe{
\item{\code{data}:}{a list containing data or data's name. \itemize{
\item{\code{dfxyz}: the displayed values in the form of a data frame with three columns, a name or a matching call.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list of two elements to create the \code{trellis} object:
\itemize{
\item{\code{graphictype}: \code{xyplot}}
\item{\code{arguments}: its parameters to obtain the \code{trellis} object}
}}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.Tr} class:
\itemize{
\item{\code{max3d} and \code{min3d}: triangular limits}
\item{\code{adjust}: a logical to adjust the device with the limits}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{adjust.update}: a logical indicating if the \code{adjust} slot is updating}
\item{\code{cornerp}: coordinates of the triangle extremities.}
\item{\code{lgrid}: a list containing the three coordinates of the grid segments extremities(\code{pts1},
\code{pts2}, \code{pts3}) and the value of the division (\code{posgrid})}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg}}, directly.
}
\section{Methods}{
\describe{
\item{prepare}{\code{signature(object = "ADEg.Tr")}:
performs the calculations before display the object (e.g. limits, grid and axis calculations)}
\item{setlatticecall}{\code{signature(object = "ADEg.Tr")}:
prepares the \code{lattice.call} slot}
\item{panelbase}{\code{signature(object = "ADEg.Tr")}:
defines the graphical background (e.g. triangle and grid)}
\item{gettrellis}{\code{signature(object = "ADEg.Tr")}:
converts the graphic into a \code{trellis} object of \code{lattice} class}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\link{adegpar}}
\code{\linkS4class{Tr.class}}
\code{\linkS4class{Tr.label}}
\code{\linkS4class{Tr.match}}
\code{\linkS4class{Tr.traject}}
\code{\linkS4class{ADEg}}
}
\examples{
showClass("ADEg.Tr")
}
\keyword{classes}
adegraphics/man/C1.barchart-class.Rd 0000644 0001762 0000144 00000006233 13742303021 016720 0 ustar ligges users \name{C1.barchart-class}
\docType{class}
\alias{C1.barchart}
\alias{C1.barchart-class}
\alias{prepare,C1.barchart-method}
\alias{panel,C1.barchart-method}
\title{Class \code{C1.barchart}}
\description{
A class for the creation and display of a numeric score using barcharts.
}
\section{Objects from the Class}{
\code{C1.barchart} objects can be created by calls of the form \code{new("C1.barchart", ...)}.
The regular usage in this package is to use the \code{s1d.barchart} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a vector, a factor, a name or a matching call.}
\item{\code{labels}: the labels' names drawn on the top of bars.}
\item{\code{at}: the index value.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.
The specific slot for \code{C1.barchart} objects is: \itemize{
\item{\code{sort}: a logical indicating if \code{score} is sorted in ascending order.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.C1}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{C1.barchart} are:
\describe{
\item{prepare}{\code{signature(object = "C1.barchart")}:
calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "C1.barchart")}:
draws bar charts and labels.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.C1}}
\code{\link{s1d.barchart}}
}
\examples{
showClass("C1.barchart")
}
\keyword{classes}
adegraphics/man/triangle.traject.Rd 0000644 0001762 0000144 00000006475 13742303021 017035 0 ustar ligges users \name{triangle.traject}
\alias{triangle.traject}
\title{Ternary plot with trajectories}
\description{
This function represents a three dimensional scatter plot with trajectories.
}
\usage{
triangle.traject(dfxyz, fac = gl(1, nrow(dfxyz)), order, labels = levels(fac),
col = NULL, adjust = TRUE, min3d = NULL, max3d = NULL, showposition = TRUE,
facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dfxyz}{a three columns data frame, the first system of coordinates, used to produce the plot}
\item{fac}{a factor (or a matrix of factors) splitting the rows of \code{dfxyz}}
\item{order}{a vector containing the drawing order of the trajectories. A vector of length equal to factor.}
\item{labels}{a vector of character strings containing the trajectories' labels}
\item{col}{a color or a colors vector to color points, labels and lines}
\item{adjust}{a logical to adjust the device with the limits of the smaller equilateral triangle containing the values}
\item{min3d}{a vector of three values for triangular minimal limits}
\item{max3d}{a vector of three values for triangular maximal limits}
\item{showposition}{a logical indicating whether the used triangle should be shown in the complete one}
\item{facets}{a factor splitting the rows of \code{dfxyz} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
The \code{fac} factor is used to display several trajectories: each level of \code{fac} is a specific trajectory.
}
\value{
An object of class \code{ADEg} (subclass \code{Tr.traject}) or \code{ADEgS} (if \code{showposition} is TRUE,
if \code{add} is \code{TRUE} and/or if facets are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{Tr.traject}}
\code{\linkS4class{ADEg.Tr}}
}
\examples{
exo1 <- matrix(c(51.88, 32.55, 15.57, 44.94, 34.59, 20.47, 25.95, 39.15, 34.9,
37.87, 43.19, 18.94, 34.2, 43.32, 22.48, 16.13, 42.18, 41.69,
7.76, 70.93, 21.31, 6.22, 65.96, 27.82, 6.44, 57.06, 36.5,
37.24, 32.45, 30.31, 16.09, 31.22, 52.69, 6.54, 24.68, 68.78), ncol = 3, byr = TRUE)
exo1 <- as.data.frame(exo1)
names(exo1) <- c("agr", "ouv", "ter")
com <- as.factor(rep(c("Gig", "Lun", "Gan", "Mat"), c(3, 3, 3, 3)))
rec <- as.factor(rep(c("68", "75", "82"), 4))
row.names(exo1) <- paste(com, rec, sep = "")
tri1 <- triangle.traject(exo1, fac = com, showposition=FALSE, pgrid.draw = FALSE,
col = TRUE, axis.text = list(cex = 0))
}
\keyword{hplot}
\keyword{aplot}
adegraphics/man/ADEg.T-class.Rd 0000644 0001762 0000144 00000007457 13742303021 015643 0 ustar ligges users \name{ADEg.T-class}
\docType{class}
\alias{ADEg.T}
\alias{ADEg.T-class}
\alias{gettrellis,ADEg.T-method}
\alias{prepare,ADEg.T-method}
\alias{setlatticecall,ADEg.T-method}
\alias{panelbase,ADEg.T-method}
\title{Class \code{ADEg.T}}
\description{
An object of \code{ADEg.T} class represents table data.
The \code{ADEg.T} class is a virtual class, i.e. a class which is not possible to create objects but which have heirs.
This class inherits from \code{ADEg} class and
has two son classes : \code{T.image} and \code{T.value}.
}
\section{Objects from the Class}{
None object of this class can be instantiated.
}
\section{Slots}{
\describe{
\item{\code{data}:}{a list containing data or data's name. \itemize{
\item{\code{dftab}: the displayed values which can be \code{table}, \code{dist} or \code{matrix}
in the form of a data frame, a name or a matching call}
\item{\code{coordsx}: an integer or a vector indicating the columns of \code{dftab} kept}
\item{\code{coordsy}: an integer or a vector indicating the rows of \code{dftab} kept}
\item{\code{labelsx}: the columns' labels}
\item{\code{labelsy}: the rows' labels}
\item{"\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list of two elements to create the \code{trellis} object:
\itemize{
\item{\code{graphictype}: \code{xyplot}}
\item{\code{arguments}: its parameters to obtain the \code{trellis} object}
}}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.T} class:
\itemize{
\item{\code{method}: only for \code{T.value} objects}
\item{\code{symbol}: only for \code{T.value} objects}
\item{\code{center}: only for \code{T.value} objects}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{breaks.update}: a logical indicating if the legend breaks is updating}
\item{\code{axes$dx} and \code{axes$dy}: intervals for the cell size}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg}}, directly.
}
\section{Methods}{
\describe{
\item{prepare}{\code{signature(object = "ADEg.T")}:
performs the calculations before display the object (e.g. limits, grid and axis calculations)}
\item{setlatticecall}{\code{signature(object = "ADEg.T")}:
prepares the \code{lattice.call} slot}
\item{panelbase}{\code{signature(object = "ADEg.T")}:
defines the graphical background (e.g. axes, labels, ticks, box and grid)}
\item{gettrellis}{\code{signature(object = "ADEg.T")}:
converts the graphic into a \code{trellis} object of \code{lattice} class}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\link{adegpar}}
\code{\linkS4class{T.image}}
\code{\linkS4class{T.value}}
\code{\linkS4class{ADEg}}
}
\examples{
showClass("ADEg.T")
}
\keyword{classes}
adegraphics/man/plot.Rd 0000644 0001762 0000144 00000025241 14071042764 014555 0 ustar ligges users \name{plot}
\alias{kplot}
\alias{kplot.foucart}
\alias{kplot.mcoa}
\alias{kplot.mfa}
\alias{kplot.mbpcaiv}
\alias{kplot.pta}
\alias{kplot.sepan}
\alias{kplotsepan.coa}
\alias{kplot.statis}
\alias{plot}
\alias{plot.acm}
\alias{plot.betcoi}
\alias{plot.betrlq}
\alias{plot.betdpcoa}
\alias{plot.betwitdpcoa}
\alias{plot.between}
\alias{plot.coinertia}
\alias{plot.discrimin}
\alias{plot.dpcoa}
\alias{plot.fca}
\alias{plot.foucart}
\alias{plot.krandboot}
\alias{plot.krandxval}
\alias{plot.mcoa}
\alias{plot.mfa}
\alias{plot.multiblock}
\alias{plot.multispati}
\alias{plot.niche}
\alias{plot.pcaiv}
\alias{plot.procuste}
\alias{plot.randboot}
\alias{plot.randxval}
\alias{plot.rlq}
\alias{plot.pta}
\alias{plot.sepan}
\alias{plot.statis}
\alias{plot.witcoi}
\alias{plot.witdpcoa}
\alias{plot.within}
\alias{plot.witrlq}
\alias{plot.bcaloocv}
\alias{plot.discloocv}
\alias{scatter}
\alias{scatter.coa}
\alias{scatter.dudi}
\alias{scatter.nipals}
\alias{scatter.pco}
\alias{score}
\alias{score.acm}
\alias{score.mix}
\alias{score.pca}
\alias{screeplot}
\alias{screeplot.dudi}
\alias{biplot}
\alias{biplot.dudi}
\title{Methods to display the outputs of an analysis performed with \code{ade4}}
\description{
S3 methods to display the outputs of an analysis performed with \code{ade4}
}
\usage{
\method{kplot}{foucart}(object, xax = 1, yax = 2, which.tab = 1:length(object$blo), pos = -1,
storeData = TRUE, plot = TRUE, \dots)
\method{kplot}{mcoa}(object, xax = 1, yax = 2, which.tab = 1:nrow(object$cov2),
option = c("points", "axis", "columns"), pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{kplot}{mfa}(object, xax = 1, yax = 2, which.tab = 1:length(object$blo), traject = FALSE,
permute = FALSE, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{kplot}{mbpcaiv}(object, xax = 1, yax = 2, which.tab =
1:length(object$blo), pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{kplot}{pta}(object, xax = 1, yax = 2, which.tab = 1:nrow(object$RV), which.graph = 1:4,
pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{kplot}{sepan}(object, xax = 1, yax = 2, which.tab = 1:length(object$blo), permute = FALSE,
traject = FALSE, posieig = "bottomleft", pos = -1, storeData = TRUE, plot = TRUE, \dots)
kplotsepan.coa(object, xax = 1, yax = 2, which.tab = 1:length(object$blo),
permute = FALSE, posieig = "bottomleft", pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{kplot}{statis}(object, xax = 1, yax = 2, which.tab = 1:length(object$tab.names), traject = FALSE,
arrow = TRUE, class = NULL, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{acm}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{betcoi}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{betdpcoa}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{betwitdpcoa}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{betrlq}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{between}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{coinertia}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{discrimin}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{dpcoa}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{fca}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{foucart}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE,
plot = TRUE, \dots)
\method{plot}{krandboot}(x, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{krandxval}(x, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{mcoa}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{mfa}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE,
plot = TRUE, \dots)
\method{plot}{multiblock}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{multispati}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{niche}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{pcaiv}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{pta}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{procuste}(x, xax = 1, yax = 2, pos = -1, storeData =
TRUE, plot = TRUE, \dots)
\method{plot}{randboot}(x, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{randxval}(x, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{rlq}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{sepan}(x, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{statis}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{witcoi}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{witdpcoa}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{within}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{witrlq}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{bcaloocv}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{plot}{discloocv}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{scatter}{dudi}(x, xax = 1, yax = 2, permute = FALSE, posieig = "topleft", prop = FALSE,
density.plot = ifelse(permute, ncol(x$tab) > 1000, nrow(x$tab) > 1000), plot = TRUE,
storeData = TRUE, pos = -1, \dots)
\method{scatter}{coa}(x, xax = 1, yax = 2, method = 1:3, posieig = "topleft", pos = -1,
storeData = TRUE, plot = TRUE, \dots)
\method{scatter}{pco}(x, xax = 1, yax = 2, posieig = "topleft", pos = -1, storeData = TRUE,
plot = TRUE, \dots)
\method{scatter}{nipals}(x, xax = 1, yax = 2, posieig = "topleft", pos = -1, storeData = TRUE,
plot = TRUE, \dots)
\method{score}{acm}(x, xax = 1, which.var = NULL, type = c("points", "boxplot"), pos = -1,
storeData = TRUE, plot = TRUE, \dots)
\method{score}{mix}(x, xax = 1, which.var = NULL, type = c("points", "boxplot"), pos = -1,
storeData = TRUE, plot = TRUE, \dots)
\method{score}{pca}(x, xax = 1, which.var = NULL, pos = -1, storeData = TRUE, plot = TRUE, \dots)
\method{screeplot}{dudi}(x, col.kept = "grey", col = "white", pos = -1, plot = TRUE, \dots)
\method{biplot}{dudi}(x, pos = -1, plot = TRUE, \dots)
}
\arguments{
\item{object, x}{objects used to select a method}
\item{xax}{an integer (or a vector) indicating which column(s) of {object} or \code{x} is(are) plotted on the x-axis}
\item{yax}{an integer (or a vector) indicating which column(s) of {object} or \code{x} is(are) plotted on the y-axis}
\item{which.tab}{a numeric vector (used in \code{kplot.*}) containing the numbers of the tables used for the analysis}
\item{option}{a string of characters (only used in \code{kplot.mfa}) indicating the drawing option:
\code{points} plot of the projected scattergram onto the co-inertia axes,
\code{axis} projections of inertia axes onto the co-inertia axes,
\code{columns} projections of variables onto the synthetic variables planes.}
\item{which.graph}{an integer between 1 and 4 (only used in \code{kplot.pta}) indicating the drawing option.
For each table of \code{which.tab}, are drawn:
\code{1} the projections of the principal axes,
\code{2} the projections of the rows,
\code{3} the projections of the columns,
\code{4} the projections of the principal components onto the planes of the compromise.}
\item{permute}{a logical value (used in \code{kplot.sepan}, \code{kplotsepan.coa} and \code{scatter.dudi}).
If \code{FALSE}, the rows are plotted by points or density surface and the columns by arrows. If \code{TRUE}, it is the opposite.}
\item{traject}{a logical value (used in \code{kplot.sepan} and \code{kplot.statis})
indicating whether the trajectories between rows should be drawn in a natural order}
\item{posieig}{a character value or a two-length numeric vector (in normalized parent coordinates \code{npc} from 0 to 1)
or \code{none} value indicating the position of the eigenvalues bar plot (used in \code{kplot.sepan}, \code{kplotsepan.coa} and \code{scatter.*}).}
\item{arrow}{a logical value (only used in \code{kplot.statis}) indicating whether the column factorial diagrams should be plotted}
\item{class}{if not NULL, a factor of length equal to the number of the total columns of the K-tables (only used in \code{kplot.statis})}
\item{prop}{a logical value (only used in \code{scatter.dudi}) indicating if the size of the arrows' labels is proportional to the analysis score.}
\item{density.plot}{a logical value (only used in \code{scatter.dudi})indicating if the points are displayed as density surface (using \code{s.density}).}
\item{method}{an integer between 1 and 3 (only used in \code{scatter.coa}) indicating the drawing option. Are drawn:
\code{1} rows and columns with the coordinates of lambda variance,
\code{2} rows variance 1 and columns by averaging,
\code{3} columns variance 1 and rows by averaging.}
\item{which.var}{the numbers of the kept columns for the analysis, otherwise all columns (used in \code{score.*})}
\item{type}{a string of characters (only used in \code{score.acm} and \code{score.mix}) indicating if points (\code{points}) or boxplot (\code{boxplot}) are used to represent levels of factors}
\item{col.kept}{one color value to color the kept axes in the barchart (used in \code{screeplot.dudi})}
\item{col}{one color value to color the axes in the barchart (used in \code{screeplot.dudi})}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
Returns an \code{ADEg} or an \code{ADEgS} object.
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\references{
See \code{ade4} website:
}
\examples{
cat("To run the example on 'topic'\n")
cat("Type in your R console: example(topic, package = 'ade4') \n")
}
\keyword{hplot}
\keyword{methods}
\keyword{multivariate}
adegraphics/man/s1d.gauss.Rd 0000644 0001762 0000144 00000005517 13742303021 015401 0 ustar ligges users \name{s1d.gauss}
\alias{s1d.gauss}
\title{1-D plot of a numeric score by Gaussian curves}
\description{
This function represents a score with a Gauss curve for each level of a factor.
}
\usage{
s1d.gauss(score, fac = gl(1, NROW(score)), wt = rep(1,
NROW(score)), steps = 200, col = NULL, fill = TRUE,
facets = NULL, plot = TRUE, storeData = TRUE, add =
FALSE, pos = -1, ...)
}
\arguments{
\item{score}{a numeric vector (or a data frame) used to produce the plot}
\item{fac}{a factor (or a matrix of factors) to split \code{score}}
\item{wt}{a vector of weights for \code{score}}
\item{steps}{a value for the number of segments used to draw the Gauss curves}
\item{col}{a logical, a color or a colors vector for labels, rugs, lines and polygons according to their factor level.
Colors are recycled whether there are not one color by factor level.}
\item{fill}{a logical to yield the polygons Gauss curves filled}
\item{facets}{a factor splitting \code{score} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
Graphical parameters for rugs are available in \code{plines} of \code{adegpar} and the ones for Gauss curves filled in \code{ppolygons}.
Some appropriated graphical parameters in \code{p1d} are also available.
}
\value{
An object of class \code{ADEg} (subclass \code{C1.gauss}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or data frame for \code{score} or data frame for \code{fac} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{C1.gauss}}
\code{\linkS4class{ADEg.C1}}
}
\examples{
data(meau, package= "ade4")
envpca <- ade4::dudi.pca(meau$env, scannf = FALSE)
dffac <- cbind.data.frame(meau$design$season, meau$design$site)
g1 <- s1d.gauss(envpca$li[, 1], fac = dffac, fill = TRUE, col = 1:6)
update(g1, steps = 10)
g2 <- s1d.gauss(envpca$li[, 1], dffac[, 2], ppoly.col = 1:4, paxes.draw = TRUE, ylim = c(0, 2),
fill = TRUE, p1d.hori = FALSE)
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/setlimits1D.Rd 0000644 0001762 0000144 00000003642 13742303021 015770 0 ustar ligges users \name{setlimits1D}
\alias{setlimits1D}
\alias{setlimits2D}
\title{
Computes limits for 1D and 2D displays.
}
\description{
Computes limits for 1D and 2D displays adding 10\% of margins around the extreme values.
}
\usage{
setlimits1D(mini, maxi, origin, includeOr)
setlimits2D(minX, maxX, minY, maxY, origin = c(0, 0), aspect.ratio = "iso", includeOr)
}
\arguments{
\item{mini}{the smallest value of a unidimensional dataset}
\item{maxi}{the largest value of a unidimensional dataset}
\item{minX}{the smallest value of the first dimension of a bidimensional dataset}
\item{maxX}{the largest value of the first dimension of a bidimensional dataset}
\item{minY}{the smallest value of the second dimension of a bidimensional dataset}
\item{maxY}{the largest value of the second dimension of a bidimensional dataset}
\item{origin}{a value (in \code{setlimits1D}) or a two-length vector (in \code{setlimits2D}) indicating origin coordinate(s)}
\item{aspect.ratio}{a character string to control physical aspect ratio of the graphic.
\code{iso} for isometric scales, \code{fill} for drawing as big as possible or \code{xy} for banking rule}
\item{includeOr}{a boolean value indicating whether the origin is included in the graphics window}
}
\value{
\code{setlimits1D} returns a two-length vector containing the limits of the graphics window on one axis. \cr
\code{setlimits2D} returns a two-length list where the first element, named \code{xlim}, contains a two-length vector
containing the limits of the graphics window on the first axis and the second, named \code{ylim}, contains the limits on
the second axis.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\examples{
setlimits1D(mini = -2, maxi = 2, origin = 0, includeOr = TRUE)
setlimits2D(minX = -2, maxX = 2, minY = -3, maxY = 4, origin = c(0, 0), includeOr = TRUE)
}
\keyword{aplot}
adegraphics/man/C1.hist-class.Rd 0000644 0001762 0000144 00000007120 13742303021 016075 0 ustar ligges users \name{C1.hist-class}
\docType{class}
\alias{C1.hist}
\alias{C1.hist-class}
\alias{prepare,C1.hist-method}
\alias{panel,C1.hist-method}
\title{Class \code{C1.hist}}
\description{
A class for the creation and display of a numeric score using a histogram.
}
\section{Objects from the Class}{
\code{C1.hist} objects can be created by calls of the form \code{new("C1.hist", ...)}.
The regular usage in this package is to use the \code{s1d.hist} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a vector, a factor, a name or a matching call.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.
The specific slots for \code{C1.hist} objects are: \itemize{
\item{\code{breaks}: a vector of values to split \code{score}. If \code{NULL}, \code{pretty(score, nclass)} is used.}
\item{\code{nclass}: an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
\item{\code{type}: a value among \code{count}, \code{density}, \code{percent} to indicate the unit of the cell height.}
\item{\code{right}: a logical indicating if the histogram cells are right-closed (left open) intervals.}
}}
\item{\code{stats}}{a list of internal preliminary calculations.
The specific slots for \code{C1.hist} objects are: \itemize{
\item{\code{heights}: the cell height.}
\item{\code{breaks}: the cell boundaries.}
}}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.C1}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{C1.hist} are:
\describe{
\item{prepare}{\code{signature(object = "C1.hist")}:
calls the parent method (\code{prepare} for \code{ADEg.C1}), modifies some graphical parameters used by default
and calculates the boundaries and the height of cells.}
\item{panel}{\code{signature(object = "C1.hist")}:
draws rectangles.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.C1}}
\code{\link{s1d.hist}}
}
\examples{
showClass("C1.hist")
}
\keyword{classes}
adegraphics/man/superpose.Rd 0000644 0001762 0000144 00000007772 13742303021 015623 0 ustar ligges users \name{superpose}
\alias{superpose}
\alias{superpose-methods}
\alias{superpose,ADEgORtrellis,ADEgORtrellis,ANY,ANY-method}
\alias{superpose,ADEgS,ADEgORtrellis,numeric,logical-method}
\alias{superpose,ADEgS,ADEgORtrellis,numeric,ANY-method}
\alias{superpose,ADEgS,ADEgORtrellis,missing,ANY-method}
\alias{superpose,ADEgS,ADEgS,missing,ANY-method}
\alias{+-methods}
\alias{\S4method{+}{ADEg}}
\alias{+,ADEg,ADEg-method}
\alias{+,ADEg,ADEgS-method}
\alias{+,ADEgS,ADEg-method}
\title{Superpose two graphics}
\description{
This function superposes two graphics and extends the graphical constraints of a first graphic to a second one.
}
\usage{
superpose(g1, g2, which, plot = FALSE)
\S4method{+}{ADEg}(e1, e2)
}
\arguments{
\item{g1}{an object of class \code{ADEg}, \code{ADEgS} or \code{trellis}}
\item{g2}{an object of class \code{ADEg}, \code{ADEgS} or \code{trellis} superposed on \code{g1}}
\item{e1}{an object of class \code{ADEg} or \code{ADEgS}}
\item{e2}{an object of class \code{ADEg} or \code{ADEgS} superposed on \code{e1}}
\item{which}{if \code{g1} is an \code{ADEgS}, which \code{ADEg} is used as the base of superposition
(\code{g2} is superposed on \code{g1[[which]]})}
\item{plot}{a logical indicating if the graphics is displayed}
}
\details{
The created \code{ADEgS} object is a layout of two graphical objects.
Each of the two objects superposed still have its graphical parameters in the created layout.
However, the \code{ADEgS} displayed favour the graphical parameters of the object below :
displayed limits, grid, legend and axes are those of \code{g1} (respectively \code{e1}) and \code{g2}
(respectively \code{e2}) has transparent background and labels' boxes.
The \code{superpose} method is defined for: \itemize{
\item{\code{signature(g1 = "ADEgS", g2 = "ADEg", which = "numeric", plot = "logical")}}
\item{\code{signature(g1 = "ADEgS", g2 = "ADEg", which = "numeric", plot = "ANY")}}
\item{\code{signature(g1 = "ADEgS", g2 = "ADEg", which = "missing", plot = "ANY")}:
If \code{which} is \code{missing}, the last \code{ADEg} of \code{g1@ADEglist} is used as the base of superposition. In that case, \code{which = length(g1)}}
\item{\code{signature(g1 = "ADEgORtrellis", g2 = "ADEgORtrellis", which = "ANY", plot = "ANY")}:
If \code{g1} is an \code{ADEg} object, no \code{which} is needed.}
\item{\code{signature(g1 = "ADEgS", g2 = "ADEgS", which = "missing", plot = "ANY")}}
}
The \code{+} method is defined for: \itemize{
\item{\code{signature(e1 = "ADEg", e2 = "ADEg")}: superpose e2 on e1}
\item{\code{signature(e1 = "ADEg", e2 = "ADEgS")}: superpose e2 to e1}
\item{\code{signature(e1 = "ADEgS", e2 = "ADEg")}: calls the \code{+} method with signature
\code{(e1 = "ADEg", e2 = "ADEgS")}.}
}
}
\value{
An object of class \code{"ADEgS"}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\link{add.ADEg}}
\code{\linkS4class{ADEgS}}
\code{\linkS4class{ADEg}}
}
\examples{
cha <- LETTERS[1:20]
xy <- cbind.data.frame(runif(length(cha)), runif(length(cha)))
g1 <- s.label(xy, labels = cha, ppoints.alpha = 0, pbackground.col = "grey85")
g2 <- s.label(xy, labels = cha, plabels.cex = 0, paxes.draw = TRUE, ppoints.pch = 4,
ppoints.col = "red")
g3 <- superpose(g1, g2, plot = TRUE)
g4 <- superpose(g2, g1, plot = TRUE)
data(jv73, package = "ade4")
pca1 <- ade4::dudi.pca(jv73$morpho, scannf = FALSE)
g5 <- s.label(pca1$li, plabels.optim = TRUE)
g6 <- s.class(pca1$li, jv73$fac.riv, starSize = 0, ellipseSize = 0, chullSize = 1,
ppolygons.alpha = 0.4, col = rainbow(12), ppoints.cex = 0)
g5 + g6
\dontrun{g7 <- s.label(pca1$li, plabels.optim = TRUE, facets = jv73$fac.riv, plot = FALSE)
g8 <- s.class(pca1$li, jv73$fac.riv, facets = jv73$fac.riv, starSize = 0, chullSize = 1,
ellipseSize = 0, ppolygons.alpha = 0.4, col = rainbow(12), ppoints.cex = 0, plot = FALSE)
g9 <- superpose(g7, g8, plot = TRUE)
}
}
\keyword{hplot}
\keyword{methods}
adegraphics/man/C1.interval-class.Rd 0000644 0001762 0000144 00000006162 13742303021 016757 0 ustar ligges users \name{C1.interval-class}
\docType{class}
\alias{C1.interval}
\alias{C1.interval-class}
\alias{prepare,C1.interval-method}
\alias{panel,C1.interval-method}
\title{Class \code{C1.interval}}
\description{
A class for the creation and display of an interval between two numeric scores.
}
\section{Objects from the Class}{
\code{C1.interval} objects can be created by calls of the form \code{new("C1.interval", ...)}.
The regular usage in this package is to use the \code{s1d.interval} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a vector, a factor, a name or a matching call.}
\item{\code{at}: the index value.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.
The specific slot for \code{C1.density} objects is: \itemize{
\item{\code{method}: a value, \code{bars} or \code{area}, to represent either segments or areas between scores.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.C1}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{C1.interval} are:
\describe{
\item{prepare}{\code{signature(object = "C1.interval")}:
calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "C1.interval")}:
draws segments or polygons.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.C1}}
\code{\link{s1d.interval}}
}
\examples{
showClass("C1.interval")
}
\keyword{classes}
adegraphics/man/S2.arrow-class.Rd 0000644 0001762 0000144 00000006632 13742303021 016310 0 ustar ligges users \name{S2.arrow-class}
\docType{class}
\alias{S2.arrow}
\alias{S2.arrow-class}
\alias{prepare,S2.arrow-method}
\alias{panel,S2.arrow-method}
\title{Class \code{S2.arrow}}
\description{
A class for creating and drawing bi-dimensional plot with arrows from the origin to the coordinates and labeled.
}
\section{Objects from the Class}{
\code{S2.arrow} objects can be created by calls of the form \code{new("S2.arrow", ...)}.
The regular usage in this package is to use the \code{s.arrow} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
\item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
\item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
\item{\code{labels}: a vector containing the arrows' labels.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
The specific slot for \code{S2.arrow} objects is: \itemize{
\item{\code{Sp}: a spatial object stem from \code{Sp} package.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{lim.update}: a logical indicating if the limits are updating}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S2}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S2.arrow} are:
\describe{
\item{prepare}{\code{signature(object = "S2.arrow")}:
calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates limits.}
\item{panel}{\code{signature(object = "S2.arrow")}:
draws points, arrows and labels.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S2}}
\code{\link{s.arrow}}
}
\examples{
showClass("S2.arrow")
}
\keyword{classes}
adegraphics/man/table.image.Rd 0000644 0001762 0000144 00000005223 13742303021 015733 0 ustar ligges users \name{table.image}
\alias{table.image}
\title{Heat map-like representation with colored cells}
\description{
This function represents a two dimensional table plot in which cells are colored according with their value.
}
\usage{
table.image(dftab, coordsx = 1:ncol(as.matrix(dftab)), coordsy =
nrow(as.matrix(dftab)):1, labelsx, labelsy, nclass = 3,
breaks = NULL, col = NULL, plot = TRUE, storeData =
TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dftab}{a data frame, matrix, contingency table or distance matrix used to produce the plot}
\item{coordsx}{an integer or a vector indicating the columns of \code{dftab} kept}
\item{coordsy}{an integer or a vector indicating the rows of \code{dftab} kept}
\item{labelsx}{columns labels}
\item{labelsy}{rows labels}
\item{breaks}{a vector of values to split \code{dftab}. If \code{NULL}, \code{pretty(dftab, nclass)} is used.}
\item{nclass}{an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
\item{col}{a color or a colors vector used for the cells}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{T.image}) or \code{ADEgS} (if \code{add} is \code{TRUE}).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{T.image}}
\code{\linkS4class{ADEg.T}}
}
\examples{
tab <- as.table(matrix(rnorm(900), ncol = 30))
g1 <- table.image(tab)
# add a continuous color bar as legend
# update(g1, plegend.drawColorKey = TRUE)
g2 <- table.image(tab, n = 100, coordsx = c(30, 1:29), plegend.drawKey = FALSE)
data(rpjdl, package = "ade4")
X <- data.frame(t(rpjdl$fau))
Y <- data.frame(t(rpjdl$mil))
coa1 <- ade4::dudi.coa(X, scannf = FALSE)
g3 <- table.image(Y, coordsx = rank(coa1$co[, 1]), coordsy = 1:8, nclas = 5,
labelsx = "", plegend.drawKey = FALSE)
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/addpoint.Rd 0000644 0001762 0000144 00000003130 13742303021 015360 0 ustar ligges users \name{addpoint}
\alias{addpoint}
\alias{addpoint-methods}
\alias{addpoint,ADEg-method}
\alias{addpoint,ADEgS-method}
\title{
Adds points on graphics.
}
\description{
Adds a \code{trellis} object containing one or several points on one or several graphical objects.
}
\usage{
addpoint(object, xcoord, ycoord, plot = TRUE, ...)
}
\arguments{
\item{object}{an object of class \code{ADEg} or \code{ADEgS}
}
\item{xcoord}{an integer (or a vector) indicating where \code{label} is(are) plotted
on the x-axis, passed to the \code{panel.points} function of the \code{lattice} package
}
\item{ycoord}{an integer (or a vector) indicating where \code{label} is(are) plotted
on the y-axis, passed to the \code{panel.points} function of the \code{lattice} package
}
\item{plot}{a logical indicating if the graphics is displayed
}
\item{\dots}{Other arguments. Additional graphical parameters (see the \code{ppoints} list in
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}}).
If \code{object} is an \code{ADEgS}, the argument \code{which} identify which
\code{ADEg} is/are used for superposition.
}
}
\value{
An object of class \code{"ADEgS"}.
}
\author{Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEgS}}
\code{\link[lattice]{panel.points}}
}
\examples{
data(deug, package = "ade4")
deug$cent[1]
g1 <- s1d.density(deug$tab[, 1], plot = FALSE)
addpoint(g1, xcoord = deug$cent[1], ycoord = 0, ppoints = list(col = "black",
pch = "*", cex = 3))
}
\keyword{aplot}
adegraphics/man/S2.logo-class.Rd 0000644 0001762 0000144 00000006355 13742303021 016120 0 ustar ligges users \name{S2.logo-class}
\docType{class}
\alias{S2.logo}
\alias{S2.logo-class}
\alias{prepare,S2.logo-method}
\alias{panel,S2.logo-method}
\title{Class \code{S2.logo}}
\description{
A class for the creation of a bi-dimensional plot with pictures for points representation.
}
\section{Objects from the Class}{
\code{S2.logo} objects can be created by calls of the form \code{new("S2.logo", ...)}.
The regular usage in this package is to use the \code{s.logo} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
\item{\code{logos}: a list containing the picture to use for each point.}
\item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
\item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
The specific slot for \code{S2.logo} objects is: \itemize{
\item{\code{rect}: a logical to frame \code{logos}.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S2}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S2.class} are:
\describe{
\item{prepare}{\code{signature(object = "S2.class")}:
calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "S2.class")}:
displays the logos.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S2}}
\code{\link{s.logo}}
}
\examples{
showClass("S2.logo")
}
\keyword{classes}
adegraphics/man/s.arrow.Rd 0000644 0001762 0000144 00000005441 13742303021 015160 0 ustar ligges users \name{s.arrow}
\alias{s.arrow}
\title{2-D scatter plot with arrows}
\description{
This function represents a two dimensional scatter plot with arrows linking points to the origin.
}
\usage{
s.arrow(dfxy, xax = 1, yax = 2, labels = row.names(as.data.frame(dfxy)),
facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
}
\arguments{
\item{dfxy}{a data frame used to produce the plot}
\item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
\item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
\item{labels}{a character vector containing labels for arrows}
\item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data are stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\details{
An other origin for arrows can be specified using an \code{adegpar} parameters: \code{porigin}.
Graphical parameters for points and arrows are available in \code{parrows} and \code{ppoints} of \code{adegpar}.
}
\value{
An object of class \code{ADEg} (subclass \code{S2.arrow}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or vectors for \code{xax}/\code{yax} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S2.arrow}}
\code{\linkS4class{ADEg.S2}}
}
\examples{
data(doubs, package = "ade4")
dudi1 <- ade4::dudi.pca(doubs$env, scale = TRUE, scannf = FALSE, nf = 3)
dudi2 <- ade4::dudi.pca(doubs$fish, scale = TRUE, scannf = FALSE, nf = 2)
coin1 <- ade4::coinertia(dudi1, dudi2, scannf = FALSE, nf = 2)
g11 <- s.arrow(coin1$l1, plabels.cex = 0.87, plot = FALSE)
g12 <- s.arrow(coin1$c1, plabels.cex = 1, plabels.col = "red", plot = FALSE)
g1 <- superpose(g12, g11, plot = TRUE)
xy <- cbind(rnorm(50), rnorm(50))
g2 <- s.arrow(xy, plabels.cex = 0.9, plines = list(lwd = 1.5), parrows.angle = 20)
update(g2, plines = list(col = rainbow(5)))
}
\keyword{aplot}
\keyword{hplot}
adegraphics/man/T.value-class.Rd 0000644 0001762 0000144 00000010612 13742303021 016202 0 ustar ligges users \name{T.value-class}
\docType{class}
\alias{T.value}
\alias{T.value-class}
\alias{prepare,T.value-method}
\alias{panel,T.value-method}
\title{Class \code{T.value}}
\description{
A class for the representation of a matrix, a data frame, or a distance matrix using symbols, varying in size or color.
}
\section{Objects from the Class}{
\code{T.value} objects can be created by calls of the form \code{new("T.value", ...)}.
The regular usage in this package is to use the \code{table.value} function.
}
\section{Slots}{
\describe{
\item{\code{data}:}{a list containing data or data's name. \itemize{
\item{\code{dftab}: the displayed values which can be \code{table}, \code{dist} or \code{matrix}
in the form of a data frame, a name or a matching call}
\item{\code{coordsx}: an integer or a vector indicating the columns of \code{dftab} kept}
\item{\code{coordsy}: an integer or a vector indicating the rows of \code{dftab} kept}
\item{\code{labelsx}: the columns' labels}
\item{\code{labelsy}: the rows' labels}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.T} class.
The specific slots for \code{T.value} objects are: \itemize{
\item{\code{breaks}: a vector of values to split \code{dftab}. If \code{NULL}, \code{pretty(dftab, nclass)} is used.}
\item{\code{nclass}: an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
\item{\code{col}: a \code{NULL} value, a color or a colors vector to color symbols.}
\item{\code{method}: the method of representation for \code{dftab} (color shading or proportional size).}
\item{\code{symbol}: the type of symbol (square or circle).}
\item{\code{center}: a center value for method \code{size}.}
\item{\code{centerpar}: a logical or a list to represent center value using elements in the
\code{adegpar("ppoints")} list.}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{breaks.update}: a logical indicating if the legend breaks is updating.}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.T}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.T}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.T}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.T}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.T"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{T.value} are:
\describe{
\item{prepare}{\code{signature(object = "T.value")}:
calls the parent method (\code{prepare} for \code{ADEg.T}) and modifies some graphical parameters used by default and calculates limits and grid.}
\item{panel}{\code{signature(object = "T.value")}:
draws symbols.}
}
}
\note{
For the symbol size, if the method is \code{size}, we use perceptual scaling (Tanimura et al. 2006) .
}
\references{
Tanimura, S. and Kuroiwa, C. and Mizota, T. 2006 Proportional symbol
mapping in R \emph{Journal of Statistical Software} \bold{15}, 1--7
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.T}}
\code{\linkS4class{T.cont}}
\code{\link{table.value}}
}
\examples{
showClass("T.value")
}
\keyword{classes}
adegraphics/man/ADEg.S1-class.Rd 0000644 0001762 0000144 00000011302 13742303021 015703 0 ustar ligges users \name{ADEg.S1-class}
\docType{class}
\alias{ADEg.S1}
\alias{ADEg.S1-class}
\alias{prepare,ADEg.S1-method}
\alias{setlatticecall,ADEg.S1-method}
\alias{gettrellis,ADEg.S1-method}
\alias{panelbase,ADEg.S1-method}
\title{Class \code{ADEg.S1}}
\description{
An object of \code{ADEg.S1} class represents unidimensional data into one dimension.
The \code{ADEg.S1} class is a virtual class, i.e. a class which is not possible to create objects but which have heirs.
This class inherits from \code{ADEg} class and
has five son classes : \code{S1.boxplot}, \code{S1.class}, \code{S1.distri}, \code{S1.label} and \code{S1.match}.
}
\section{Objects from the Class}{
None object of this class can be instantiated.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
\item{\code{at}: the index value.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list of two elements to create the \code{trellis} object:
\itemize{
\item{\code{graphictype}: \code{xyplot}}
\item{\code{arguments}: its parameters to obtain the \code{trellis} object}
}}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S1} class.}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters:
\itemize{
\item{\code{hori.update}: a logical indicating if the sense of direction of the graphics is updating}
\item{\code{backgrid}: a list of two elements for grid lines. \code{backgrid$x} defines the coordinates
of the lines (horizontal or vertical depending on the graphics orientation) and \code{backgrid$d} the grid mesh}
\item{\code{rug}: an index value indicating where the rugs are drawn}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg}}, directly.
}
\section{Methods}{
\describe{
\item{prepare}{\code{signature(object = "ADEg.S1")}:
performs the calculations before display the object (e.g. limits, grid and axis calculations)}
\item{setlatticecall}{\code{signature(object = "ADEg.S1")}:
prepares the \code{lattice.call} slot}
\item{panelbase}{\code{signature(object = "ADEg.S1")}:
defines the graphical background (e.g. grid, rugs and box)}
\item{gettrellis}{\code{signature(object = "ADEg.S1")}:
converts the graphic into a \code{trellis} object of \code{lattice} class}
\item{zoom}{\code{signature(object = "ADEg.S1", zoom = "numeric", center = "missing")}:
performs a zoom in (if zoom < 1) or out (if zoom > 1) centered, only in one-dimension}
\item{zoom}{\code{signature(object = "ADEg.S1", zoom = "numeric", center = "numeric")}:
performs a zoom in (if zoom < 1) or out (if zoom > 1) around the center passed in parameter, only in one-dimension}
}
}
\note{
Various graphical parameters are used for display an ADEg.S1 object.
The list \code{p1d} in \code{adegpar()} is thought specific for \code{ADEg.S1} objects.
The \code{ADEg.S1} class and \code{ADEg.C1} class are both used to represent an unidimensional information (e.g. a score).
The difference between these two classes is mainly ideological : an \code{ADEg.S1} object is a representation into one
dimension (e.g. one line) while an \code{ADEg.C1} object is a representation into two dimensions (e.g. curves).
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\link{adegpar}}
\code{\link{zoom}}
\code{\linkS4class{S1.boxplot}}
\code{\linkS4class{S1.class}}
\code{\linkS4class{S1.distri}}
\code{\linkS4class{S1.label}}
\code{\linkS4class{S1.match}}
\code{\linkS4class{ADEg}}
}
\examples{
showClass("ADEg.S1")
adegpar("p1d")
}
\keyword{classes}
adegraphics/man/S1.label-class.Rd 0000644 0001762 0000144 00000006442 13742303021 016233 0 ustar ligges users \name{S1.label-class}
\docType{class}
\alias{S1.label}
\alias{S1.label-class}
\alias{prepare,S1.label-method}
\alias{panel,S1.label-method}
\title{Class \code{S1.label}}
\description{
A class for the creation and display of a numeric score with labels.
}
\section{Objects from the Class}{
\code{S1.label} objects can be created by calls of the form \code{new("S1.label", ...)}.
The regular usage in this package is to use the \code{s1d.label} function.
}
\section{Slots}{
\describe{
\item{\code{data}}{a list containing data or data's name. \itemize{
\item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
\item{\code{labels}: the labels' names drawn for each \code{score} value.}
\item{\code{at}: the index value.}
\item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used
with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
\item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
If \code{FALSE}, only the names of the data arguments are stored.}
}}
\item{\code{trellis.par}}{a list of parameters for \code{lattice} call.
It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
\item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones
given by \code{adegpar()} function.}
\item{\code{lattice.call}}{a list to create the \code{trellis} object.}
\item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S1} class.
The specific slot for \code{S1.class} objects is: \itemize{
\item{\code{poslabel}: the label position of each \code{score} value, it can be "regular" or "value".}
}}
\item{\code{stats}}{a list of internal preliminary calculations}
\item{\code{s.misc}}{a list of some others internal parameters.
The specific slot for \code{S1.label} objects is: \itemize{
\item{\code{rug}: an index value indicating where the rugs are drawn.}
}}
\item{\code{Call}}{an object of class \code{call}}
}
}
\section{Extends}{
Class \code{\linkS4class{ADEg.S1}}, directly.\cr
Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S1}, distance 2.\cr
Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S1}, distance 3.\cr
Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S1}, distance 3.
}
\section{Methods}{
The methods of the father classes \code{"ADEg.S1"} and \code{"ADEg"} can be used by inheritance.
The specific methods for \code{S1.label} are:
\describe{
\item{prepare}{\code{signature(object = "S1.label")}:
calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default.}
\item{panel}{\code{signature(object = "S1.label")}:
draws labels and its links with score points.}
}
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{ADEg}}
\code{\linkS4class{ADEg.S1}}
\code{\link{s1d.label}}
}
\examples{
showClass("S1.label")
}
\keyword{classes}
adegraphics/man/s.corcircle.Rd 0000644 0001762 0000144 00000004362 13742303021 015774 0 ustar ligges users \name{s.corcircle}
\alias{s.corcircle}
\title{Correlation circle}
\description{
This function produces a correlation circle.
}
\usage{
s.corcircle(dfxy, xax = 1, yax = 2, labels = row.names(as.data.frame(dfxy)),
fullcircle = TRUE, facets = NULL, plot = TRUE, storeData = TRUE,
add = FALSE, pos = -1, ...)
}
\arguments{
\item{dfxy}{a data frame used to produce the plot}
\item{labels}{a vector containing the points' labels}
\item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
\item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
\item{fullcircle}{a logical to include the complete circle (limits are then c(-1, 1))}
\item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
of the data are represented on different sub-graphics}
\item{plot}{a logical indicating if the graphics is displayed}
\item{storeData}{a logical indicating if the data should be stored in
the returned object. If \code{FALSE}, only the names of the data
arguments are stored}
\item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
already plotted in the current device}
\item{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 \code{storeData} is
\code{FALSE}}
\item{\dots}{additional graphical parameters (see
\code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
}
\value{
An object of class \code{ADEg} (subclass \code{S2.corcircle}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or
if facets or vectors for \code{xax}/\code{yax} are used).\cr
The result is displayed if \code{plot} is \code{TRUE}.
}
\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot@univ-lyon1.fr} and Stephane Dray
}
\seealso{
\code{\linkS4class{S2.corcircle}}
\code{\linkS4class{ADEg.S2}}
}
\examples{
data (olympic, package = "ade4")
dudi1 <- ade4::dudi.pca(olympic$tab, scannf = FALSE)
g1 <- s.corcircle(dudi1$co)
g2 <- s.corcircle(dudi1$co, fullcircle = FALSE, pback.col = "grey")
}
\keyword{aplot}
\keyword{hplot}
adegraphics/DESCRIPTION 0000644 0001762 0000144 00000003626 14120626425 014243 0 ustar ligges users Package: adegraphics
Type: Package
Title: An S4 Lattice-Based Package for the Representation of
Multivariate Data
Version: 1.0-16
Author: Stéphane Dray and Aurélie Siberchicot , with contributions from Jean Thioulouse. Based on earlier work by Alice Julien-Laferrière.
Maintainer: Aurélie Siberchicot
Description: Graphical functionalities for the representation of multivariate data. It is a complete re-implementation of the functions available in the 'ade4' package.
Depends: R (>= 3.0.2)
License: GPL (>= 2)
Imports: ade4 (>= 1.7-13), graphics, grid, KernSmooth, lattice,
latticeExtra, methods, RColorBrewer, sp (>= 1.1-1), stats
Suggests: Guerry, knitr, maptools, pixmap, rmarkdown, markdown, spdep,
splancs
Collate: adeGsenv.R parameter.R utils.R utilstriangle.R genericMethod.R
utilsclass.R panelfunctions.R ADEg.R ADEgS.R utilsADEgS.R
ADEg.C1.R C1.barchart.R C1.curve.R C1.curves.R C1.density.R
C1.gauss.R C1.dotplot.R C1.hist.R C1.interval.R ADEg.S1.R
S1.boxplot.R S1.class.R S1.distri.R S1.label.R S1.match.R
ADEg.S2.R S2.arrow.R S2.class.R S2.corcircle.R S2.density.R
S2.distri.R S2.image.R S2.label.R S2.logo.R S2.match.R
S2.traject.R S2.value.R ADEg.T.R T.image.R T.value.R T.cont.R
ADEg.Tr.R Tr.class.R Tr.label.R Tr.match.R Tr.traject.R
addhist.R addline.R addpoint.R addsegment.R addtext.R
ade4-kplot.R ade4-scatter.R ade4-score.R ade4-plot.R
multiplot.R s.Spatial.R utilskey.R
URL: http://pbil.univ-lyon1.fr/ADE-4/, Mailing list:
https://listes.univ-lyon1.fr/sympa/info/adelist
BugReports: https://github.com/sdray/adegraphics/issues
Encoding: UTF-8
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2021-09-16 10:56:20 UTC; siberchicot
Repository: CRAN
Date/Publication: 2021-09-16 11:40:05 UTC
adegraphics/build/ 0000755 0001762 0000144 00000000000 14120621324 013616 5 ustar ligges users adegraphics/build/vignette.rds 0000644 0001762 0000144 00000000326 14120621324 016156 0 ustar ligges users mQ0`I