case_fishing: Write a case file for fishing data to the disk.

Description Usage Arguments Examples

View source: R/case-write.R

Description

Use R code to write arguments to the disk, which will later be used in a ss3sim simulation.

Usage

1
case_fishing(years = 1, years_alter = NULL, fvals = 2, case, spp)

Arguments

years

Vector of years for which F values are specified, if there is more than one fleet or season the catches must be ordered by season:year:fishery (e.g., season1year1fishery1, season2year1fishery1, season1year2fishery1). The actual vector does not have to correspond to true years but must be the correct length (e.g., instead of 2000:2004 you can use 1:5). Use this argument to create an index to old values. years_alter will use values in this vector. For example, with two seasons and one fishery that operates for 4 years you could use the following: 1:8.

years_alter

Vector of years for the which F values will be altered. If there is more than one fishery or season, use the mapping system created in years because actual year values cannot be recycled. For example, to change the second season of the second year in the example above, use: 4.

fvals

Vector of F values to be entered into ss.par file, where length(fvals) == length(years_alter) must be true.

case

The case number you want to write to. If case = 1, then the result will be 'F1'.

spp

A vector of character values argument specifying the species.

Examples

1
2
case_fishing(1:100, 1:100, seq(0, 0.4, length.out = 100), 2, "cod")
done <- file.remove("F2-cod.txt")

ss3sim documentation built on Nov. 9, 2019, 1:06 a.m.