easily write a csv file compatible with nonmem

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

Arguments

x

dataframe to be written to csv

file

character string naming a file or connection open for writing.

sep

field string separator, defaults to comma (",")

row.names

logical value whether to include row names

na

value for NA

quote

whether character or factor columns should be surrounded by double quotes

...

remaining arguments passed to data.table::fwrite

Details

nonmem uses '.' for NA values, does not like quotes in column names and does not handle row names, so these are all presets

Examples

# NOT RUN {
write_nonmem(nonmemdat, 'folder/nonmemdat.csv')
# }