0

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

Nirpeksh
  • 99
  • 2
  • 11

1 Answers1

0

look like similar question: How to solve prcomp.default(): cannot rescale a constant/zero column to unit variance

try this and edit ur question with what didnt work

akhetos
  • 686
  • 1
  • 10
  • 31