par.fit.ascr: Parallelising ascr fits using a cluster

View source: R/fit.r

par.fit.ascrR Documentation

Parallelising ascr fits using a cluster

Description

Fits SECR models on different cores within a cluster.

Usage

par.fit.ascr(n.cores, ..., arg.list = NULL)

par.admbsecr(n.cores, ..., arg.list = NULL)

Arguments

n.cores

A positive integer representing the number of cores to use for parallel processing.

...

Lists with components comprising arguments for a call to fit.ascr. Component names must be the argument names.

arg.list

Alternatively, a list with components comprising the lists of arguments, as above.

Value

A list, where components are objects returned by fit.ascr. There is one component for each list of arguments provide in ....

Examples

## Not run: 
## Running the examples in the fit.ascr() documentation in parallel.
simple.capt <- example.data$capt["bincapt"]
simple.hn.args <- list(capt = simple.capt, traps = example.data$traps,
                       mask = example.data$mask, fix = list(g0 = 1))
simple.hr.args <- list(capt = simple.capt, traps = example.data$traps,
                       mask = example.data$mask, detfn = "hr")
bearing.capt <- example.data$capt[c("bincapt", "bearing")]
bearing.hn.args <- list(capt = bearing.capt, traps = example.data$traps,
                        mask = example.data$mask, fix = list(g0 = 1))
## This will only run if you have 4 cores available, you may need
## to alter n.cores as appropriate.
fits <- par.fit.ascr(n.cores = 4, simple.hn.args, simple.hr.args,
                     bearing.hn.args)

## End(Not run)


b-steve/ascr documentation built on Aug. 15, 2022, 2:38 p.m.