Skip to contents

Read Data Frame From CSV File

Usage

read_csv_file(
  file,
  sep = get_column_separator(),
  dec = ",",
  encoding = "UTF-8",
  na.strings = "",
  ...,
  remove_comments = TRUE,
  set_empty_string_to_na = FALSE,
  dbg = 1L
)

Arguments

file

path to csv file

sep

Column separator character. Default: semicolon ";"

dec

Decimal separator character. Default: comma ","

encoding

file encoding string. Default: "UTF-8". Possible other value: "unknown"

na.strings

strings occurring in the files representing NA (not available). Default: ""

...

further arguments passed to fread

remove_comments

Should rows starting with "#" be removed (the default)?

set_empty_string_to_na

if TRUE (the default is FALSE) empty strings in character columns are replaced with NA

dbg

if TRUE debug messages are shown