## 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)
myMixtures <- PLNmixture(Abundance ~ 1 + offset(log(Offset)), clusters = 1:4, data = trichoptera,
control = PLNmixture_param(smoothing = 'none'))
# Shut down parallel workers
if (FALSE) {
future::plan("sequential")
}
Run the code above in your browser using DataLab