This function reads a CSV file formatted for NONMEM (or similar) where missing values are represented by a period (".") and converts these to NA. It utilizes the data.table::fread function for fast reading and converts the result to a data frame.

read_csv_dots(
  file,
  sep = ",",
  quote = "",
  na.strings = ".",
  integer64 = "double",
  data.table = FALSE,
  ...
)

Arguments

file

A character string specifying the path to the CSV file to be read.

sep

Separator between columns, defaults to ","

quote

Set to handle fields starting with a double quote, defaults to ""

na.strings

A character vector of strings to be interpreted as NA values, defaults to "."

integer64

Reads columns detected as containing integers larger than 2^31, default to "double"

data.table

Boolean, set to TRUE to return data.table, set to FALSE to return data.frame

...

arguments passed to data.table::fread()

Value

A data frame with the contents of the CSV file, with "." values replaced by NA.