Write a new Spc.ctl file. This function is used to modify (within R) a pre-existent Spc.ctl file.

writeGmacsctlfile(
  Dir = NULL,
  FileName = NULL,
  CtlFile = NULL,
  DatFile = NULL,
  stock = "",
  model_name = "",
  Ass_Year = "",
  nsex = NULL,
  nmature = NULL,
  Start_Y = NULL,
  End_Y = NULL,
  DirTPL = NULL
)

Arguments

Dir

(character string)- path where to save the new Spc.ctl file

FileName

(character string)- name of the new Spc.ctl file

CtlFile

(character string)- Object (list) containing the ex Spc.ctl file - The list is created using the readGMACSctl() function.

DatFile

(list; optional)- Object containing the .dat file - This can either be the output of the readGMACSdat() function. If DatFile is provided, then you don't need to provide the following: nsex; Start_Y; End_Y

stock

(character string)- name of the stock of interest

model_name

(character string)- name of the model currently considered (e.g., "model 22.A")

Ass_Year

(character string)- Year of this assessment

nsex

(integer; optional)- Number of sexes considered in the model. This is required if you don't provide the DatFile.

nmature

(integer; optional)- Number of maturity type(s) considered in the model. This is required if you don't provide the DatFile.

DirTPL

(character string)- the directory where the gmacsbase.TPL file you are using for the stock assessment is hold.

Start_Y;End_Y

(integer; optional)- First and last year of the assessment period. This is required if you don't provide the DatFile.

Value

create a new .ctl file.

See also