I'm trying to PCA some columns in larger data set which contains NAs. When I remove the NAs it produces a mismatch in the number of items so I cannot use the data set for Label info. How do I fix this?
> ef <- sepData[c(4, 5, 6, 7, 8, 9, 10)]
> autoplot(prcomp(na.omit(ef)), data = sepData, colour = 'species', label = TRUE, label.size = 3)
Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 27, 24
sepData contains the sample names on each row. When I remove omit NAs I lose the order for some columns.