read_
functions:read_csv()
: comma separated (CSV) filesread_tsv()
: tab separated filesread_delim()
: general delimited filesread_fwf()
: fixed width filesread_table()
: tabular files where columns are separated bywhite-space.read_log()
: web log filesvignette('readr')
gives more detail on how readr guesses the columntypes, how you can override the defaults, and provides some useful toolsfor debugging parsing problems.fread()
. The most important differences are discussed below.col_names
and col_types
not header
and colClasses
).locale()
.fread()
read_csv()
called fread. Compared to fread, readrfunctions:data.table::fread()
.''
) and backslash escapes (''
), and can produce factors anddate/times directly.fread()
saves you workby automatically guessing the delimiter, whether or not the file hasa header, and how many lines to skip.fread()
is designed tobe as fast as possible.