data(potato)
so <- sopls(Sensory ~ Chemical + Compression + NIRraw, data=potato, ncomp=c(5,5,5))
# Loadings
loadings(so, ncomp=c(3), block=2)[, 1:3]
# Scores
scores(so, block=1)[, 1:4]
# Default plot from first block
scoreplot(so)
# Second block with names
scoreplot(so, ncomp=c(3), block=2, labels="names")
# Scatterplot matrix
scoreplot(so, ncomp=c(3,2), block=3, comps=1:3)
# Combination of blocks (see Details)
scoreplot(so, ncomp=c(3,2), block=3, comps=list(1,0,1))
# Default plot from first block
loadingplot(so, scatter=TRUE)
# Second block with names
loadingplot(so, ncomp=c(3), block=2, labels="names", scatter=TRUE)
# Scatterplot matrix
loadingplot(so, ncomp=c(3,2), block=3, comps=1:3, scatter=TRUE)
# Correlation loadings
corrplot(so, block=2, ncomp=1)
# Default plot from first block
biplot(so)
Run the code above in your browser using DataLab