Why PCA code is not running, the matrix is 0х0?

38 Views Asked by At
df_scaled <- as.data.frame(scale(df))
features <- df_scaled[, -10]
target <- df_scaled[, 10]
pc <- PCA(features, graph = FALSE)
print(pc)

Error in eigen(crossprod(t(X), t(X)), symmetric = TRUE) :0х0 matrix

where is the error?

I have 19178 obs. of 29 variables, so it is strange that the program does not work

0

There are 0 best solutions below