1

I would like to change the number of decimals for the Proportion of Variance displayed in the axes of a PCA plot using prcomp() and autoplot(). By default it's set to 2 decimals places (92.46%, 5.31%) but I'd like to round them to 1 decimal place (92.5%, 5.3%).

library(ggfortify)
df <- iris[1:4]
pca <- prcomp(df)
autoplot(pca)

Thank you!

AndrewGB
  • 16,126
  • 5
  • 18
  • 49
elisemillar
  • 55
  • 1
  • 4

0 Answers0