write_nonmem: easily write a csv file compatible with nonmem

Description Usage Arguments Details Examples

View source: R/writers.R

Description

easily write a csv file compatible with nonmem

Usage

1
2
3
4
5
6
7
8
9
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

1
2
3
4
## Not run: 
write_nonmem(nonmemdat, 'folder/nonmemdat.csv')

## End(Not run)

PKPDmisc documentation built on April 14, 2020, 5:49 p.m.