This function is especially useful if the csv file was written using NMwriteData.

  args.fread, = NULL,
  format = fnExtension(file),



The file to read. Must be pure text.


List of arguments passed to fread. Notice that except for "file", you need to supply all arguments to fread if you use this argument. Default values can be configured using NMdataConf.

The default is to return data as a data.frame. Pass a function (say tibble::as_tibble) in to convert to something else. If data.tables are wanted, use"data.table". The default can be configured using NMdataConf.


Format of file to read. Can be of length>1 in which case the first format found will be used (i.e. format is a prioritized vector). If not one of "rds" or "fst", it is assumed to be a delimited text file. Default is to determine this from the file name extension. Notice, if a delimited format is used, the extension can very well be different from "csv" (say file name is "")". This will work for any delimited format supported by fread.


Optional arguments to pass to read_fst if format="fst" is used.


A data set of class as defined by


This is almost just a shortcut to fread so you don't have to remember how to read the data that was exported for Nonmem. The only added feature is that meta data as written by NMwriteData is read and attached as NMdata metadata before data is returned.

See also


Other DataRead: NMreadTab(), NMscanData(), NMscanInput(), NMscanTables()