<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Triangular Representation and Groups of points</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="https://rpkg.net/assets/examples.css" />
</head><body>

<table width="100%" summary="page for triangle.class"><tr><td>triangle.class</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2> Triangular Representation and Groups of points </h2>

<h3>Description</h3>

<p>Function to plot triangular data (i.e. dataframe with 3 columns of
positive or null values) and a partition <br />
</p>


<h3>Usage</h3>

<pre>
triangle.class(ta, fac, col = rep(1, length(levels(fac))), 
    wt = rep(1, length(fac)), cstar = 1, cellipse = 0, axesell = TRUE, 
    label = levels(fac), clabel = 1, cpoint = 1, pch = 20, draw.line = TRUE, 
    addaxes = FALSE, addmean = FALSE, labeltriangle = TRUE, sub = "", csub = 1, 
    possub = "bottomright", show.position = TRUE, scale = TRUE, min3 = NULL, 
    max3 = NULL)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>ta</code></td>
<td>
<p> a data frame with 3 columns of null or positive numbers  </p>
</td></tr>
<tr valign="top"><td><code>fac</code></td>
<td>
<p> a factor of length the row number of <code>ta</code> </p>
</td></tr>
<tr valign="top"><td><code>col</code></td>
<td>
<p> a vector of color for showing the groups </p>
</td></tr>
<tr valign="top"><td><code>wt</code></td>
<td>
<p> a vector of row weighting for the computation of the gravity centers by class </p>
</td></tr>
<tr valign="top"><td><code>cstar</code></td>
<td>
<p> a character size for plotting the stars between 0 (no stars) and 1 (complete star) for a line linking a point to the gravity center of its belonging class. </p>
</td></tr>
<tr valign="top"><td><code>cellipse</code></td>
<td>
<p> a positive coefficient for the inertia ellipse size </p>
</td></tr>
<tr valign="top"><td><code>axesell</code></td>
<td>
<p> a logical value indicating whether the ellipse axes should be drawn </p>
</td></tr>
<tr valign="top"><td><code>label</code></td>
<td>
<p> a vector of strings of characters for the labels of gravity centers </p>
</td></tr>
<tr valign="top"><td><code>clabel</code></td>
<td>
<p> if not NULL, a character size for the labels, used with <code>par("cex")*clabel</code> </p>
</td></tr>
<tr valign="top"><td><code>cpoint</code></td>
<td>
<p> a character size for plotting the points, used with <code>par("cex")*cpoint</code>. If zero, no points are drawn </p>
</td></tr>
<tr valign="top"><td><code>pch</code></td>
<td>
<p> if <code>cpoint</code> &gt; 0, an integer specifying the symbol or the single character to be used in plotting points </p>
</td></tr>
<tr valign="top"><td><code>draw.line</code></td>
<td>
<p> a logical value indicating whether the triangular lines should be drawn </p>
</td></tr>
<tr valign="top"><td><code>addaxes</code></td>
<td>
<p> a logical value indicating whether the axes should be plotted </p>
</td></tr>
<tr valign="top"><td><code>addmean</code></td>
<td>
<p> a logical value indicating whether the mean point should be plotted </p>
</td></tr>
<tr valign="top"><td><code>labeltriangle</code></td>
<td>
<p> a logical value indicating whether the varliable labels of <code>ta</code> should be drawn on the triangular sides </p>
</td></tr>
<tr valign="top"><td><code>sub</code></td>
<td>
<p> a string of characters for the graph title </p>
</td></tr>
<tr valign="top"><td><code>csub</code></td>
<td>
<p> a character size for plotting the graph title </p>
</td></tr>
<tr valign="top"><td><code>possub</code></td>
<td>
<p> a string of characters indicating the sub-title position (&quot;topleft&quot;, &quot;topright&quot;, &quot;bottomleft&quot;, &quot;bottomright&quot;) </p>
</td></tr>
<tr valign="top"><td><code>show.position</code></td>
<td>
<p> a logical value indicating whether the sub-triangle containing the data should be put back in the total triangle </p>
</td></tr>
<tr valign="top"><td><code>scale</code></td>
<td>
<p>a logical value for the graph representation : the total triangle (FALSE) or the sub-triangle (TRUE) </p>
</td></tr>
<tr valign="top"><td><code>min3</code></td>
<td>
<p> if not NULL, a vector with 3 numbers between 0 and 1 </p>
</td></tr>
<tr valign="top"><td><code>max3</code></td>
<td>
<p> if not NULL, a vector with 3 numbers between 0 and 1. Let notice that <code>min3</code>+<code>max3</code> must equal c(1,1,1) </p>
</td></tr>
</table>


<h3>Author(s)</h3>

<p> Daniel Chessel</p>


<h3>Examples</h3>

<pre>
if(!adegraphicsLoaded()) {
  data(euro123)
  par(mfrow = c(2, 2))
  x &lt;- rbind.data.frame(euro123$in78, euro123$in86, euro123$in97)
  triangle.plot(x)
  triangle.class(x, as.factor(rep("G", 36)), csta = 0.5, cell = 1)
  triangle.class(x, euro123$plan$an)
  triangle.class(x, euro123$plan$pays)
  triangle.class(x, euro123$plan$an, cell = 1, axesell = TRUE)
  triangle.class(x, euro123$plan$an, cell = 0, csta = 0, 
    col = c("red", "green", "blue"), axesell = TRUE, clab = 2, cpoi = 2)
  triangle.class(x, euro123$plan$an, cell = 2, csta = 0.5, 
    axesell = TRUE, clab = 1.5)
  triangle.class(x, euro123$plan$an, cell = 0, csta = 1, scale = FALSE, 
    draw.line = FALSE, show.posi = FALSE)
  par(mfrow = c(2, 2))
}</pre>


</body></html>
