I am trying to plot something like this shown below, but with dataframe object. My eigenvalues are in DF format as below. How can we get this plotted?
library("factoextra")
data(iris)
res.pca <- prcomp(iris[, -5], scale = TRUE)
# Extract the eigenvalues/variances
get_eig(res.pca)
fviz_eig(res.pca, geom="line")
DF <- as.data.frame(res.pca$x)