View source: R/MakeTIEllipses.R
ggConvexHull | R Documentation |
ggConvexHull
computes a peeled convex hull for a set of points
described by 2 variables and plot it.
Uses function PeelZeHull
derived from
the function ExPosition::peeledHull
which, in turn,
got inspiration from Michael Greenacre package CA
.
The original code can be found at
http://carme-n.org/?sec=code2.
ggConvexHull( data, x_axis = 1, y_axis = 2, percentage = 0.66, col.line = "darkorchid4", alpha.line = 1, line.size = 1, line.type = 1, col.hull = "darkorchid", alpha.hull = 0.4, names.of.factors = "Dimension " )
data |
an item by variables data,frame or matrix. |
x_axis |
column number for the first variable.
|
y_axis |
column number for the second variable.
|
percentage |
proportion of the convexHull to keep, Default: .66 |
col.line |
= the color of the line for the hill. Default is 'darkorchid4'. |
alpha.line |
= 1, alpha value (transparency) for the lines, takes values between 0 (completely transparent) and 1 (no transparent). |
line.size |
= 1, thickness of the line for the ellipses. |
line.type |
= 1 (solid line) the type of line (values from 0 to 6). |
col.hull |
= 'darkorchid', the color to fill the hull. |
alpha.hull |
= .4 alpha value (transparency) for the hull. |
names.of.factors |
= "Dimension", names of the factors. if NULL name.of.factors is dimnames(data)[2], if dimnames(data)[2] is NULL, the dimensions will be labelled "Dimension". This parameter is needed to avoid conflict when plotting these names as they need to be the same as the names of the data used to make the BaseMap plot (i.e., Fi/Fj/Fij). |
a ggplot2 object to draw a convex hull
Herve Abdi
## Not run: if(interactive()){ #EXAMPLE1 } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.