case_comp function

Write a case file for length- or age-composition data

Write a case file for length- or age-composition data

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

case_comp(fleets = 1, Nsamp = NULL, years = NULL, cpar = 2, type, case, spp)

Arguments

  • fleets: Vector of fleet numbers, where the order of fleets will dictate the order of all remaining arguments.
  • Nsamp: A list of length length(fleets), where each element of the list contains a vector of sample sizes for each year for that given fleet.
  • years: A list of length length(fleets), where each element of the list contains a vector of years for the given fleet.
  • cpar: A vector of cpar for each fleet.
  • type: A character value of "agecomp" or "lcomp", to write age- or length-composition specifications, respectively. Argument can be a vector (e.g., c("agecomp", "lcomp")) if you want the case files to be the same for length and age compositions.
  • case: The casenumber you want to write to. If case = 1 and type = "agecomp", then the result will be 'agecomp1'.
  • spp: A vector of character values argument specifying the species.

Examples

case_comp(fleets = 1:2, case = 30, spp = "cod", Nsamp = list(rep(10, 40), rep(10, 25)), years = list(61:100, 76:100), cpar = 2:1, type = "agecomp") done <- file.remove("agecomp30-cod.txt")
  • Maintainer: Kelli F. Johnson
  • License: MIT + file LICENSE
  • Last published: 2019-11-08