'Change decimals for proportion of variance displayed in autoplot PCA
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!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|