This function writes a CSV file formatted for NONMEM (or similar) where missing values are converted to a period ("."). It utilizes the data.table::fwrite function.

write_csv_dots(
  x,
  file,
  sep = ",",
  quote = FALSE,
  row.names = FALSE,
  na = ".",
  ...
)

Arguments

x

Any list of same length vectors (eg. data.frame and data.table)

file

Output file name

sep

Separator between columns, default is ","

quote

Should character fields, factor filds and column names be surrounded by double quotes? Defaults to FALSE

row.names

Boolean. Should row names be written? Defaults to FALSE

na

The string to use for missing values in the data, defaults to "."

...

arguments passed to data.table::fwrite()