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

writeGmacsdatfile(
  Dir = NULL,
  FileName = NULL,
  overwrite = FALSE,
  DatFile = NULL,
  stock = "",
  model_name = "",
  Ass_Year = "",
  DirTPL = NULL,
  CatchDF_format = NULL,
  SurveyDF_format = NULL,
  SizeFreqDF_format = NULL,
  Ver_number = NULL
)

Arguments

Dir

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

FileName

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

overwrite

(logical)- Specify if the existing file should be overwritten. The default value is overwrite = FALSE.

DatFile

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

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.

DirTPL

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

CatchDF_format

(integer)- Overwrite the catch data format. If 0, catch data will be written using the 'old' format; if 1, catch data will be written using the 'new' format. Both the maturity states and shell condition that are incorporated in the 'new format' are not used in the model but this is for a future option. By default, both of them will be set as undetermined when switching from the 'old' to the 'new' format.

SurveyDF_format

(integer)- Overwrite the relative abundance index data format. If 0, survey data will be written using the 'old' format; if 1, survey data will be written using the 'new' format.

SizeFreqDF_format

(integer)- Overwrite the size frequency data format. If 0, size frequency data will be written using the 'old' format; if 1, size frequency data will be written using the 'new' format. @param Ver_number (character)- The version of Gmacs. This is used only when developing new code versions of Gmacs.

Value

create a new .dat file.

See also