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