These functions parse rectangular files (like csv or fixed-width format) into tibbles. They specify the overall structure of the file, and how each line is divided up into fields.
The column specification describes how each column is parsed from a character vector in to a more specific data type. readr does make an educated guess about the type of each column, but you’ll need override those guesses when it gets them wrong.
Column parsers define how a single column is parsed, or a parse a single vector. Each parser comes in two forms:
parse_xxx() which is used to parse vectors that already exist in R and
col_xxx() which is used to parse vectors as they are loaded by a
The “locale” controls all options that vary from country-to-country or language-to-language. This includes things like the character used as the decimal mark, the names of days of the week, and the encoding. See
vignette("locales") for more details.
Despite its name, readr also provides a number of functions to write data frames to disk, or to convert them to in-memory strings.
These functions can be used with non-rectangular files, binary data, and to help debug rectangular files that fail to parse.
The chunked API allows you to read in files that are larger than memory, processing a chunk at a time. The API experimental: please try it out but be aware that it may change in the future.