When I set ncp to be 1 and use predict.PCA for PCA prediction, the function always reports an error crossprod(t(coord), object$svd$V) : non-conformable arguments.
I realized that it's an issue relevant to ncol and rownames in the function predict.PCA, which cannot properly deal with object$var$coord when it's a vector (i.e., when ncp == 1).
I would suggest debugging the lines with ncol and rownames in predict.PCA to let them better accommodate vectors.
Hi François,
When I set
ncp
to be 1 and usepredict.PCA
for PCA prediction, the function always reports an errorcrossprod(t(coord), object$svd$V) : non-conformable arguments
.I realized that it's an issue relevant to
ncol
andrownames
in the functionpredict.PCA
, which cannot properly deal withobject$var$coord
when it's a vector (i.e., whenncp == 1
).I would suggest debugging the lines with
ncol
andrownames
inpredict.PCA
to let them better accommodate vectors.I would really appreciate your time and help!
Best,
Jianzhao