This function replaces the tail compression value for length-composition data in a .dat file that was read in using r4ss::SS_readdat() with those specified in tail_compression. It then writes a new file with name dat_file_out into the working directory.

change_tail_compression(tail_compression, dat_list, outfile = NULL)

Arguments

tail_compression

*The new tail_compression value to be used. Must be a numeric value, as a proportion. For example 0.1 means 10 percent. See the Stock Synthesis manual for further information. A NULL value indicates no action, a negative value indicates to Stock Synthesis to ignore it (not use that feature).

dat_list

A Stock Synthesis data list object as read in from SS_readdat. Be sure to correctly specify which section of the data file you want to work with when reading it in using the section argument. Where, section = 1 reads in the input values used to run the model and section = 2 reads in the expected values generated given all the input to the OM. section = 3 is not used within ss3sim, but this section provides bootstrapped data sets that have been sampled internally within SS.

outfile

A character string specifying the file name to use when writing the information to the disk. The string must include the proper file extension. No file is written using the default value of NULL, which leads to increased speed because writing the file takes time and computing resources.

Value

A modified Stock Synthesis .dat file is returned invisibly.

Author

Cole Monnahan