Simple auxiliary to save a CSV dataset with attributes

If non-standard attributes are present in the data.frame object, these are stored as a .atr file in addition to the .csv file. Loading with IQRloadCSVdata will restore the full object with attributes NA is stored as ".". Compliance mode not supported with this function.

IQRsaveCSVdata(
  data,
  filename,
  na = ".",
  quote = FALSE,
  row.names = FALSE,
  FLAGattributes = TRUE,
  replaceComma = NULL
)

Arguments

data

A data.frame with the contents of the CSV file

filename

Path/filename to the csv dataset. If file ends with .csv.gz, the csv will be zipped by data.table::fwrite()

na

Character to represent NA values

quote

TRUE: use "" quotes, FALSE: do not (for NONMEM and MONOLIX)

row.names

TRUE: export row names FALSE: do not (typical use in IQnca)

FLAGattributes

FALSE: do not export custom attributes as .atr file. TRUE: do (default)

replaceComma

NULL: do not replace comma. Character: replace by user-provided character

See also

Other General Data I/O: IQRloadCSVdata(), IQRloadSASdata(), IQRoutputCSV(), IQRoutputXPT()

Author

Henning Schmidt, Daniel Kaschek, Daniel Lill, IntiQuan