I am trying to make 2 Screeplots. 1. A Screeplot that shows the variance of each PC 2. A plot that shows the relation of each variable with PCx
I used vegan to get my PCA:
LUI.C.V.PCA <- rda(LUI.C.V, scale=TRUE)
I tried this one from a vegan guide and replaced the x (2x) with my LUI.C.V.PCA:
screeplot(LUI.C.V.PCA, bstick = FALSE, type = c("barplot", "lines"), npcs = min(10, if (is.null(x$CCA)) x$CA$rank else x$CCA$rank), ptype = "o", bst.col = "red", bst.lty = "solid", xlab = "Component", ylab = "Inertia", main = deparse(substitute(LUI.C.V.PCA)))
error: object 'x' not found
Does anyone know what I did wrong or how I can do this easily? Thanks!