NIPALS error - non-conformable arrays

Hi MixOmics,

I am trying to use NIPALS to impute my missing data for my MS proteomic block.

When I run the following command:
nipals(untargeted.ru, ncomp = 10, reconst = TRUE)

I get this error:
Error in ph.new/drop(sqrt(crossprod(ph.new))) : non-conformable arrays

untargeted.ru is my proteomic dataset; with 49 samples in rows, and 409 proteins in columns. The missing values are indicated by NA. There is a very high rate of missingness in the dataset - 8237 out of 20041 observations are NA. Is this too much missing data?

Many thanks,
Heather

Hi Heather,

Thanks for using mixOmics!

Can you please:

As a sidenote, if you have any features/samples who are all NAs (and thus/or have zero variance), please filter them beforehand. You can so so using:

untargeted.ru <- untargeted.ru[!is.na(apply(untargeted.ru , 1, function(x) var(x, na.rm = TRUE))),
                               !is.na(apply(untargeted.ru , 2, function(x) var(x, na.rm = TRUE)))]

Thanks

Al