I have a dataset BO which contains more than 40 variable which are of type INT,FACTOR or NUM . I need to reduce the number of variables by performing PCA In this process i have wrote the following code
BO_pca <- prcomp(BO[, sapply(BO, is.numeric)], center = TRUE, scale = TRUE)
This have given me following error
Error in prcomp.default(BO[, sapply(BO, is.numeric)], center = TRUE, scale = TRUE) :
cannot rescale a constant/zero column to unit variance
Kindly help and also guide me through the further process please