Error when using cutoff in plotVar

I’m trying to use the plotVar function with a specified cutoff value (with the results of PLS). The problem is that I get the following error:

Error in (ind.group[i] + 1):ind.group[i + 1] : NA/NaN argument

This does not happen if I set the cutoff value to 0.0. Any suggestion? Thank you.

Hi @lorenzoF92,
I could not reproduce this using the following code.

data(liver.toxicity)
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic
toxicity.spls <- spls(X, Y, ncomp = 3, keepX = c(50, 50, 50),
                      keepY = c(10, 10, 10))

plotVar(toxicity.spls, cex = c(1,0.8), cutoff = 0.99)
plotVar(toxicity.spls, cex = c(1,0.8), cutoff = 0)

Can you please provide a reproducible example? You can do so here or via email.

Best,

Al

I also get this same issue, has this been resolved by any chance? I am using my own transcript and metabolomics data. Perhaps for some pairs of variables the correlation somehow is NaN? Any help with how to proceed would be helpful. Thank you.

Afternoon @bioscientist,

As @aljabadi has mentioned, without any code or context, it is very difficult to reproduce your issue. If you can provide your code (via email or in this post), we can get to helping you asap.

Cheers,
Max.