Description Usage Arguments Details Value See Also Examples
View source: R/compile.bootsPLS.object.R
Combine several bootsPLS objects into one
1 | compile.bootsPLS.object(bootsPLS.list,path,pattern,file,save.file)
|
bootsPLS.list |
A list of bootsPLS object, as obtained from multiple calls to |
path |
Only used if |
pattern |
Only used if |
file |
Only used if |
save.file |
Optional. Full path of the Rdata file to be saved with the combined objects. |
This function works with either a list of bootsPLS
object, a path
and a pattern
or a path
and a file
. The outputs can be saved into a Rdata file. See Examples below.
A 'bootsPLS' object is returned for which plot
, fit.model
and prediction
are available.
See bootsPLS
for the outputs.
plot.bootsPLS
, fit.model
, prediction
, bootsPLS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ## 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")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.