Hello! I am attempting to carry out performance assessment on a PLS-DA dataset:
En.GenNoC.plsda.perf <- perf(En.GenNoC.plsda, validation = 'Mfold', folds = 2, progressBar = TRUE, nrepeat = 10)
But keep returning the following error:
Error in dimnames(x) <- dn : length of 'dimnames'  not equal to array extent
Here is the code I had used to transform my filtered data to plsda format:
En.GenNoC.plsda <- plsda(En.GenNoC.keep, SamplesNoC, logratio = 'CLR', ncomp = 8)
X = En.GenNoC.keep,
Y = SamplesNoC.
Below are the dimensions of X (genus reads per sample), which is a list:
 8 433
And Y is a factor of sample types with length 8:
I am confused by the error message as length of dimnames would be 2 since there a set of dimnames each for the rows and columns:
There would be no dimnames(Y) as Y is a factor:
I had compared my code and data format to the Koren PLS-DA example from the mixOmics workshop and could not find anything different. By the simplicity of the error message, I am probably overlooking something simple, but I’m at a loss as to what needs to be done so I’d appreciate any advice possible.
Thanks very much!