read_rby: Reads results-by-year (sum file)

Description Usage Arguments Examples

Description

Reads a stock summary file in table format and returns it as a data frame.

Usage

1
2
3
4
read_rby(file, format = "rvk", cn = c("year", "r", "refB", "ssb", "oY",
  "pY", "refF", "hr", "oI1", "pI1", "oI2", "pI2"), info = FALSE,
  name_stock = NA, yAss = NA, aR = NA, aF = c(NA, NA), Run = NA,
  Model = NA)

Arguments

file

If it does not contain an absolute path, the file name is relative to the current working directory, getwd().

format

Character specifying the origin of the input file. So far implemented "rvk" and "abd" format.

cn

Names of columns to return for "rvk" format.

info

boolean. If FALSE (default) only data.frame with XXX returned. If TRUE a list containing the data.frame and a list containing the additional information is returned. See return for additional XXX.

name_stock

character. Stock name.

yAss

integer. Assessment year

aR

integer. Age of recruitment.

aF

vector. Elements contain youngest and oldest age used to calculate the reference fishing mortality.

Run

Run name (spring survey, fall survey, both surveys, etc ..)

Model

Model name (Adcam, Adapt, Separable, etc ..)

Examples

1
2
3
4
5
file <- paste(path.package("fishvise"),'extdata/resultsbyyear',sep='/')
read_rby(file)

file <- paste(path.package("fishvise"),'extdata/NSH.sum',sep='/')
read_rby(file,format="abd")

einarhjorleifsson/fishvise documentation built on May 16, 2019, 1:26 a.m.