od <- options(digits = 4)
## load some data
data(beetles)
data(plants)
## log transform the bettle data
beetles <- log(beetles + 1)
## fit the model, a symmetric CoCA
bp.sym <- coca(beetles ~ ., data = plants, method = "symmetric")
## extract the scores
scr <- scores(bp.sym)
## predictive CoCA using SIMPLS and formula interface
bp.pred <- coca(beetles ~ ., data = plants)
scr2 <- scores(bp.pred)
options(od)
Run the code above in your browser using DataLab