file_increment: Rename key Stock Synthesis output files by adding integer...

View source: R/file_increment.R

file_incrementR Documentation

Rename key Stock Synthesis output files by adding integer value

Description

Rename files found with pattern by adding i to their name before the extension.

Usage

file_increment(
  path,
  i,
  verbose = FALSE,
  pattern = "^[CcPRw][a-zA-Z]+\\.sso|summary\\.sso|\\.par$"
)

Arguments

path

Directory where model files are located.

i

An integer value to append to the file name before the .sso extension.

verbose

A logical value specifying if output should be printed to the screen.

pattern

A character value specifying the file names to search for in getwd().

Details

The .par file, which is the only file extension searched for with the default entry that does not end in .sso, is modified differently.⁠_i.sso⁠ is added to the file name.

Value

Invisibly returns a vector of logical values specifying whether or not the file was successfully renamed.

Author(s)

Kelli F. Johnson

See Also

jitter()


r4ss/r4ss documentation built on April 30, 2024, 4:42 a.m.