PlotVar with only one Y

Issue #155 resolved
Former user created an issue

Hello,
I have no problem when I use plotvar() after a pls() with many Y (Fig.1). But if i do this with only one Y,I get the Fig.2 (the name of the variable disappears). How could I fix it?
Thank you for your answer

Comments (2)

  1. Florian Rohart

    Hi there,

    The input parameter "var.names" should do the trick:

    data(liver.toxicity)
    X <- liver.toxicity$gene
    Y <- liver.toxicity$clinic[,1]
    toxicity.spls <- spls(X, Y, ncomp = 3, keepX = c(50, 50, 50))
    plotVar(toxicity.spls) # your problem is here
    plotVar(toxicity.spls,var.names=list(X=colnames(X),Y="bla")) # name of Y is now "bla"
    
  2. Log in to comment