Read rectangular filesThese 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. |
|
---|---|
Read a delimited file (including CSV and TSV) into a tibble |
|
|
Read a fixed width file into a tibble |
Read common/combined log file into a tibble |
|
Read whitespace-separated columns into a tibble |
|
Column specificationThe 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. |
|
Retrieve parsing problems |
|
Create column specification |
|
Examine the column specifications for a data frame |
|
Generate a column specification |
|
Column parsersColumn parsers define how a single column is parsed, or how to parse a single vector. Each parser comes in two forms: |
|
|
Parse logicals, integers, and reals |
|
Parse date/times |
Parse factors |
|
Parse using the "best" type |
|
Parse numbers, flexibly |
|
Skip a column |
|
Locale controlsThe “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 |
|
Create locales |
|
Create or retrieve date names |
|
Write rectangular filesDespite its name, readr also provides a number of functions to write data frames to disk, or to convert them to in-memory strings. |
|
Convert a data frame to a delimited string |
|
|
Write a data frame to a delimited file |
Readr editionsreadr supports two editions of parser. Version one is a single threaded eager parser that readr used by default from its first release to version 1.4.0. Version two is a multi-threaded lazy parser used by default from readr 2.0.0 onwards. |
|
Temporarily change the active readr edition |
|
Retrieve the currently active edition |
|
Read non-rectangular filesThese functions parse non-rectangular files (like csv or fixed-width format) into long (so-called melted) format. They specify the overall structure of the file, and how each line is divided up into fields. |
|
Return melted data for each token in a delimited file (including csv & tsv) |
|
Return melted data for each token in a fixed width file |
|
Return melted data for each token in a whitespace-separated file |
|
Low-level IO and debugging toolsThese functions can be used with non-rectangular files, binary data, and to help debug rectangular files that fail to parse. |
|
Read/write a complete file |
|
Read/write lines to/from a file |
|
Read/write RDS files. |
|
Read built-in object from package |
|
Count the number of fields in each line of a file |
|
Guess encoding of file |
|
Re-convert character columns in existing data frame |
|
Get path to readr example |
|
Returns values from the clipboard |
|
Determine whether progress bars should be shown |
|
Determine how many threads readr should use when processing |
|
Determine whether column types should be shown |
|
Determine whether to read a file lazily |