Tune.block.splsd function issue

Hello, I am currently trying use mixomics’ DIABLO and it constantly throws the following error while running tune.block.splsd function;

" Error in svd(x, nu = 1, nv = 1) : infinite or missing values in ‘x’ "

when I investigate the reason why, it is said that if the data I used contains NA’s or non-numeric entries this is a possible error; however, I checked my data it is definitely numeric but my files contains empty cells(NA). On the other hand a friend of mine who is working in the same project and whose data contains NAs ran the code without any errors. So, I asked her to run my code in her computer, and the same error occurred. Therefore I thought my data was problematic; however, when I use the same data by filling the empty boxes in excel, the error does not occur. I am really stuck here and do not know what to do. I would be very appreciated if someone have any suggestion.

I am also leaving my code here for you to look at it.
https://paste.ubuntu.com/p/MNDT5rwC5G/

Dear @sugeyigi

Tt seems to me that the problem is how the NAs values are input and how it is read in R.
sum(is.na(X)) should tell you whether R detect those NA values.

Another (but unlikely in your case) reason could be that you are pushing the number of components too far and the algorithm runs on empty matrices. ncomp = 3 is probably sufficient for a first run.

Kim-Anh

1 Like

Thank you for your help! It seems like my NA values are too many that they cause linearity. I have eliminated the columns with too many NA values and run the code again and it worked.