mixOmics - can't run Case Study of sPLS-DA with SRBCT dataset

Viewed 20

When running mixOmics Case Study of sPLS-DA with SRBCT dataset (http://mixomics.org/case-studies/splsda-srbct-case-study), I get an error.

#prepare data for running (s)PLS-DA
library(mixOmics)
data(srbct)
X <- srbct$gene
Y <- srbct$class 
summary(Y) ## class summary
dim(X) ## number of samples and features
length(Y) ## length of class memebrship factor = number of samples
#run PLS-DA
result.plsda.srbct <- plsda(X, Y) # run the method
plotIndiv(result.plsda.srbct) # plot the samples
#run sPLS-DA
srbct.splsda <- splsda(X, Y, ncomp = 10)  # set ncomp to 10 for performance assessment later

# plot the samples projected onto the first two components of the PLS-DA subspace
plotIndiv(srbct.splsda , comp = 1:2, 
          group = srbct$class, ind.names = FALSE,  # colour points by class
          ellipse = TRUE, # include 95% confidence ellipse for each class
          legend = TRUE, title = '(a) PLSDA with confidence ellipses')

The error is the same when running {plotInvid}, whether for PLS-DA or sPLS-DA:

Error in is(object, c("mint.block.pls", "mint.block.spls", "mint.block.plsda",  : 
  length(class2) == 1L n'est pas TRUE

Any advices please? I am using R 4.2 with updated packages.

1 Answers

Well, obviously, it was not updated enough

BiocManager::install(version = "3.15")

seems to have fixed this issue

Related