title: How to calculate centroids in PCA?
body: <p>To compare the centroid vectors of each group of a PCA I'm looking for a method to calculate the centroids for each PC and group. Not in particular graphical but included a plot in the MWE to make it more descriptive.  </p>
  
  <pre><code>library(ggbiplot)
  data(wine)
  wine.pca &lt;- prcomp(wine, center = TRUE, scale. = TRUE)
  print(ggbiplot(wine.pca, obs.scale = 1, var.scale = 1, groups = wine.class, ellipse = TRUE, circle = TRUE))
  </code></pre>