I am wanting to add 95% confidence ellipses for the groups within my PCA plots that I have generated in Geomorph and this package appears to have no function to add these but I am aware this can be done in ggplot. From my online research I cannot find a method of keeping my PCA plots from Geomorph and adding confidence ellipse, I can only find methods that involve redoing all my PCA plots in a different package so I am hoping someone knows a way of doing this! Attached is one of my plots for reference.
library(geomorph)
library(MASS)
mydata <- readland.tps("Flipper Ratios LM 22.TPS", specID = "ID")
coords <- as.matrix(mydata)
Flipratioslabel <- read.csv("Classifier flipper ratios.csv", header = TRUE)
is.factor(Flipratioslabel$Morphotype)
# Perform procrustes alignment and do Principal Components Analysis ---------------
flipperratios.gpa <- gpagen(mydata, print.progress = FALSE)
summary(flipperratios.gpa)
plotAllSpecimens(flipperratios.gpa$coords, mean = TRUE, links = NULL, label = TRUE, plot.param = list())
# PCA ------------------------------------------------------------------------------
flipperratios.pca <-plotTangentSpace(flipperratios.gpa$coords, label = TRUE, axis1 = 2, axis2 = 3, groups = Flipratioslabel$Morphotype, legend = TRUE)