Hi,
I'm relative new to R and ROPLS so please forgive any errors in this message.
I am trying to perform a PLS-DA analysis using the ROPLS package on some NMR data in an R object 'sunoesy' (less the first four columns which contain non-numeric data). The y response is a categorical factor 'treatment'. After running the code I get the following error message:
sunoesy.lpsda<-opls(sunoesy[,-c(1:4)], treatment)
Error in if (ncol(ynMN) == 1 || drop(sqrt(crossprod((tOldVn - tVn)/tVn))) < :
missing value where TRUE/FALSE needed
I have been through my data object 'sunoesy' and there are no missing values or NAs. I suspect that the kind of error described here might be occurring (https://stackoverflow.com/questions/20541883/weird-error-in-r), but I don't know how to go about sorting this out given I am using pre-defined code within an r package.
Many thanks for any assistance.
Abigail x