importCol {scape} | R Documentation |
Import Coleraine model results from .res file, and rearrange into a standard format suitable for plotting.
importCol(res.file, info="", Dev=FALSE, CPUE=FALSE, Survey=FALSE, CAc=FALSE, CAs=FALSE, CLc=FALSE, CLs=FALSE, LA=FALSE, quiet=TRUE)
res.file |
name of Coleraine model results file to import. |
info |
optional string containing information to store with model results. |
Dev |
whether recruitment deviates were estimated in model. |
CPUE |
whether model was fitted to catch-per-unit-effort data. |
Survey |
whether model was fitted to survey abundance index data. |
CAc |
whether model was fitted to commercial catch-at-age data. |
CAs |
whether model was fitted to survey catch-at-age data. |
CLc |
whether model was fitted to commercial catch-at-length data. |
CLs |
whether model was fitted to survey catch-at-length data. |
LA |
whether model was fitted to length-at-age data. |
quiet |
whether to report progress while parsing file. |
A list of class scape
containing at least N
, B
,
and Sel
. The other elements may or may not be included in the
list, depending on how importCol
was called:
N |
predicted numbers at age |
B |
predicted biomass, recruitment, and observed landings (year things) |
Sel |
predicted selectivity and observed maturity (age things) |
Dev |
predicted recruitment deviates from the stock-recruitment curve |
CPUE, Survey |
commercial and survey abundance index and fit |
CAc, CAs |
commercial and survey C@A (catch at age) and fit |
CLc, CLs |
commercial and survey C@L (catch at length) and fit |
LA |
observed L@A and fit |
This import function is implemented for the Coleraine statistical catch-at-age software, and can serve as a template for scape users who would like to implement import functions for specific stock assessment software.
The example datasets x.cod
, x.ling
, x.oreo
, and
x.sbw
were generated using importCol
.
The functions ll
(package gdata) and head
are
recommended for browsing model results, e.g. ll(x.cod);
ll(x.cod$N); head(x.cod$N)
.
Arni Magnusson arnima@u.washington.edu.
Hilborn, R., M. Maunder, A. Parma, B. Ernst, J. Payne, and P. Starr. 2003. Coleraine: A generalized age-structured stock assessment model. User's manual version 2.0. University of Washington Report SAFS-UW-0116. Available at http://fish.washington.edu/research/coleraine/coleraine.pdf.
read.table
, readLines
, scan
,
x.cod
, x.ling
, x.oreo
,
x.sbw
.
scape-package
gives an overview of the package.
## Not run: path <- paste(.find.package("scape"), "/example/cod.res", sep="") x.cod <- importCol(path, Dev=T, Survey=T, CAc=T, CAs=T) ## End(Not run)