View source: R/multi_ellipse.R
multi_ellipse | R Documentation |
This function can be used to create a confidence (Hotelling T2) interval for a PCA score plot per group.
multi_ellipse(data, x, y, alpha = 0.95, len = 200, ellipse = NULL)
data |
data frame or table |
x |
(name of) x vector |
y |
(name of) y vector |
alpha |
confidence interval |
len |
number of points to create the ellipse |
ellipse |
name of column of groups |
This is a helper function which is used to create a confidence (Hotelling T2) interval for a PCA score plot per group.
A data frame is returned with the points to create the ellipse.
Rico Derks, modified by Marco Bladergroen
# if ellipse is not NULL this function assumes you have data with a factorial column named as in 'ellipse' to draw multiple ellipses. x and y should contain the name (string) of the columns of the data to be plotted. If ellipse is NULL the (single) ellipse is drawn according to data in x and y (vectors).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.