I have used this piece of code and it works
imputePCA(ACP, ncp = 2, scale = TRUE, method = c("Regularized","EM"),
row.w = NULL, ind.sup=NULL,quanti.sup=NULL,quali.sup=NULL,
coeff.ridge = 1, threshold = 1e-06, seed = NULL, nb.init = 1,
maxiter = 1000)
However when I run this right after:
res <- PCA(ACP[1:8,-1])
I still get the error message "In PCA(ACP[1:8, -1]) :
Missing values are imputed by the mean of the variable: you should use the imputePCA function of the missMDA package"
Although I used the imputePCA code