#' ## Use future to dispatch the computations on 2 workers
if (FALSE) {
future::plan("multisession", workers = 2)
}
data(trichoptera)
trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)
myPCA <- PLNPCA(Abundance ~ 1 + offset(log(Offset)), data = trichoptera, ranks = 1:5)
# Shut down parallel workers
if (FALSE) {
future::plan("sequential")
}
Run the code above in your browser using DataLab