plotContrib with method 'median'

Issue #47 resolved
Kim-Anh Le Cao repo owner created an issue

load('DiverseDenoiseNormalised.RData')

Y = as.factor(indiv$HMPbodysubsite)

splsda.classic = splsda(data.TSS, Y, ncomp = 3, keepX = c(rep(50, 3)))

contrib = plotContrib(splsda.classic, method = 'median') # note: bug with method = median

Error in barplot.default(contrib$importance, horiz = T, las = 1, col = contrib$Contrib, : incorrect number of names Called from: barplot(contrib$importance, horiz = T, las = 1, col = contrib$Contrib, axisnames = TRUE, names.arg = colnames.X, cex.names = cex.name, cex.axis = 0.7, beside = TRUE, border = NA)

In addition, I removed the abs to determine the representative group. See attached, how it should look once abs has been removed. Can you add those changes please?

With bug bug.jpeg

Bug fixed nobug.jpeg

Comments (3)

  1. Log in to comment