Learn R Programming

scape (version 1.0-4)

importRes: Import Coleraine Model Results

Description

Import Coleraine model results from .res file, and rearrange into a standard format suitable for plotting.

Usage

importRes(res.file, info="", Dev=FALSE, CPUE=FALSE, Survey=FALSE,
          CAc=FALSE, CAs=FALSE, CLc=FALSE, CLs=FALSE, LA=FALSE,
          verbose=FALSE)

Arguments

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.
verbose
whether to report progress while parsing file.

Value

  • 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 importRes was called:
  • Npredicted numbers at age
  • Bpredicted biomass, recruitment, and observed landings (year things)
  • Selpredicted selectivity and observed maturity (age things)
  • Devpredicted recruitment deviates from the stock-recruitment curve
  • CPUE, Surveycommercial and survey abundance index and fit
  • CAc, CAscommercial and survey C@A (catch at age) and fit
  • CLc, CLscommercial and survey C@L (catch at length) and fit
  • LAobserved L@A and fit

References

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.

See Also

The imported model results can be plotted using plotB, plotCA, plotCL, plotIndex, plotLA, plotN, and plotSel. read.table, readLines, and scan are commonly used to import data from text files.

Examples

Run this code
path <- paste(.find.package("scape"), "/example/cod.res", sep="")
x.cod <- importRes(path, Dev=T, Survey=T, CAc=T, CAs=T)

Run the code above in your browser using DataLab