Graphical objects for ade4 functions (and more)
adegraphics-package.RdThis package was created to replace graphics functionalities of the
  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:
full storage: data is assigned to an object's slot.
names and position: data names (as a string, obtained using
deparse(substitute)) and their frame position (usingsys.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 lattice package and grid graphics.
Details
A lot of classes were implemented. Two superclass structures the architecture in class. Simple and complex graphics are distinguished in the former version:
ADEgclass provides simple graphics using one kind of data (most of a time, only a data frame) and one representation method (points, labels, arrows...)ADEgSclass provides complex graphics making juxtaposition, superposition and/or insertion of several simple graphics.
5 subclasses inherits from the superclass abstract ADEg:
ADEg.S1: one-dimensional plotADEg.S2: bi-dimensional plotADEg.C1: one-dimensional data plotted in 2-DADEg.T: table plotADEg.Tr: triangle plot
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
Examples
  showClass("ADEg")
#> Virtual Class "ADEg" [package "adegraphics"]
#> 
#> Slots:
#>                                                                        
#> Name:   trellis.par     adeg.par lattice.call       g.args        stats
#> Class:         list         list         list         list         list
#>                                 
#> Name:        s.misc         Call
#> Class:         list         call
#> 
#> Extends: "ADEgORtrellis", "ADEgORADEgSORtrellis"
#> 
#> Known Subclasses: 
#> Class "ADEg.C1", directly
#> Class "ADEg.S1", directly
#> Class "ADEg.S2", directly
#> Class "ADEg.T", directly
#> Class "ADEg.Tr", directly
#> Class "C1.barchart", by class "ADEg.C1", distance 2
#> Class "C1.curve", by class "ADEg.C1", distance 2
#> Class "C1.density", by class "ADEg.C1", distance 2
#> Class "C1.gauss", by class "ADEg.C1", distance 2
#> Class "C1.dotplot", by class "ADEg.C1", distance 2
#> Class "C1.hist", by class "ADEg.C1", distance 2
#> Class "C1.interval", by class "ADEg.C1", distance 2
#> Class "S1.boxplot", by class "ADEg.S1", distance 2
#> Class "S1.class", by class "ADEg.S1", distance 2
#> Class "S1.distri", by class "ADEg.S1", distance 2
#> Class "S1.label", by class "ADEg.S1", distance 2
#> Class "S1.match", by class "ADEg.S1", distance 2
#> Class "S2.arrow", by class "ADEg.S2", distance 2
#> Class "S2.class", by class "ADEg.S2", distance 2
#> Class "S2.corcircle", by class "ADEg.S2", distance 2
#> Class "S2.density", by class "ADEg.S2", distance 2
#> Class "S2.distri", by class "ADEg.S2", distance 2
#> Class "S2.image", by class "ADEg.S2", distance 2
#> Class "S2.label", by class "ADEg.S2", distance 2
#> Class "S2.logo", by class "ADEg.S2", distance 2
#> Class "S2.match", by class "ADEg.S2", distance 2
#> Class "S2.traject", by class "ADEg.S2", distance 2
#> Class "S2.value", by class "ADEg.S2", distance 2
#> Class "T.image", by class "ADEg.T", distance 2
#> Class "T.value", by class "ADEg.T", distance 2
#> Class "C1.curves", by class "ADEg.C1", distance 3
#> Class "T.cont", by class "ADEg.T", distance 3
#> Class "Tr.class", by class "ADEg.Tr", distance 2
#> Class "Tr.label", by class "ADEg.Tr", distance 2
#> Class "Tr.match", by class "ADEg.Tr", distance 2
#> Class "Tr.traject", by class "ADEg.Tr", distance 2
  showClass("ADEgS")
#> Class "ADEgS" [package "adegraphics"]
#> 
#> Slots:
#>                                               
#> Name:   ADEglist positions       add      Call
#> Class:      list    matrix    matrix      call
#> 
#> Extends: "ADEgORADEgSORtrellis"