Learn R Programming

IRATER (version 0.0.1)

run.IRATE: compile and run NOAA-IRATE models from within R

Description

compile and run NOAA-IRATE models from within R

Usage

run.IRATE(setup.file, safe=F, re=F, verbose=T, admb_errors=c("stop","warn","ignore"), mcmc=F, mcmc.opts=mcmc.control(), profile=F, extra.args="")

Arguments

setup.file
Character string defining IRATE setup to be run. Check IRATE.examples for preinstalled IRATE setup examples and make.dat to create new or remake.dat to alter existing setup files.
safe
(logical) Compile in safe mode? (default = FALSE)
re
(logical) Compile in random effects (ADMB-RE) mode? (default = FALSE)
verbose
(logical) Verbose output? (default = TRUE)
admb_errors
(character) how to handle compilation/linking errors?
mcmc
(logical) run post-hoc MCMC? (default = FALSE)
mcmc.opts
options for MCMC run (see mcmc.control)
profile
(logical) Run likelihood profiles? (default = FALSE)
extra.args
(character) extra (ADMB-) arguments for IRATE run

References

http://nft.nefsc.noaa.gov/IRATE.html

See Also

To check model setup files see: read.dat and make.dat. To read run results see: read.rep and read.par. For preinstalled example runs see: run.IRATE.example. To delete run files see: clean.IRATE. For more information on admb model compiliation and run prodcudres see: compile_admb and run_admb from the R2admb-package

Examples

Run this code
example.setup <- IRATE.examples()
new.setup <- new.setup.path <- example.setup[1] # select old IRATE setup to reparameterize
print(new.setup) # print setup name to be run
old.setup.path <- system.file(paste0("IRATE.examples/",new.setup,".dat"), package = "IRATER")

system(paste("mkdir -p ",new.setup.path)) # create run folder for new setup
system(paste("cp",old.setup.path, new.setup.path)) # copy old setup in new run folder
setwd(new.setup.path)

run.IRATE(new.setup) # compile and run setup

Run the code above in your browser using DataLab