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

Description Usage Arguments Examples


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


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



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:fishey (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.


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.


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


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


A vector of character values argument specifying the species.


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

Search within the ss3sim package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.