# NOT RUN {
data(MSC)
X=MSC$X
Y=MSC$Y
dim(X)
table(Y)
# perform several bootsPLS analysis
boot1=bootsPLS(X=X,Y=Y,ncomp=3,many=5,kCV=5)
boot2=bootsPLS(X=X,Y=Y,ncomp=3,many=5,kCV=5,showProgress=FALSE)
boot3=bootsPLS(X=X,Y=Y,ncomp=3,many=5,kCV=5,showProgress=FALSE)
# construct a list of bootsPLS object
bootsPLS.object=list(boot1,boot2,boot3)
# compile the outputs in one bootsPLS object
boot=compile.bootsPLS.object(bootsPLS.object)
# =======================================
# all can work from the saved file:
# =======================================
#convenient if used on a cluster
# perform several bootsPLS analysis and save the outputs
boot1=bootsPLS(X=X,Y=Y,ncomp=3,many=5,kCV=5,save.file="MSC1.Rdata")
boot2=bootsPLS(X=X,Y=Y,ncomp=3,many=5,kCV=5,showProgress=FALSE,save.file="MSC2.Rdata")
boot3=bootsPLS(X=X,Y=Y,ncomp=3,many=5,kCV=5,showProgress=FALSE,save.file="MSC3.Rdata")
# compile the outputs in one bootsPLS object
boot=compile.bootsPLS.object(path=paste(getwd(),"/",sep=""),
pattern="MSC",save.file="MSC.all.Rdata")
# or
boot=compile.bootsPLS.object(path=paste(getwd(),"/",sep=""),
file=c("MSC1.Rdata","MSC2.Rdata","MSC3.Rdata"),save.file="MSC.all.Rdata")
# }
Run the code above in your browser using DataLab