Writes an object of parameters to file ready for use in an sbatch job array.

write_parameters_file(
  x,
  filename = "parameters.csv",
  format = get_file_extension(filename),
  add_id = is_in("data.frame", class(x))
)

Arguments

x

data.frame or list of parameters to be written as a format file.

filename

Path to output file.

format

Output file format using readr write_* functions. Currently only csv or rds!

add_id

Should an id variable be included, which is just a zero-padded row number. Defaults to true when x is some type of data.frame.

Value

Invisibly returns the filename that was written.