stat_ellipse: Generic ggplot biplot function

Description Usage Arguments Note Examples

Description

Adds 95% confidence intervals ellipses around groups of values in a ggplot

Usage

1
2
stat_ellipse(mapping = NULL, data = NULL, geom = "path",
  position = "identity", ...)

Arguments

mapping

The aesthetic mapping, usually constructed with aes or aes_string. Only needs to be set at the layer level if you are overriding the plot defaults.

data

A layer specific dataset - only needed if you want to override the plot defaults.

position

The position adjustment to use for overlappling points on this layer

...

other arguments passed on to layer. This can include aesthetics whose values you want to set, not map. See biplot for more details.

stat

The statistical transformation to use on the data for this layer.

Note

Based on a function by Josef Fruehwald available here on github

Examples

1
2
3
4
5
6
p <- qplot(data=iris,
           x=Sepal.Length,
           y=Petal.Length,
           colour=Species)
p <- p + stat_ellipse()
print(p)

low-decarie/ggpca documentation built on May 21, 2019, 7:50 a.m.