Skip to content

Read rectangular files

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.

Read a delimited file into a tibble
vroom_fwf() fwf_empty() fwf_widths() fwf_positions() fwf_cols()
Read a fixed width file into a tibble
Retrieve parsing problems

Write rectangular files

These functions write data frames to disk, or to convert them to in-memory strings.

Write a data frame to a delimited file
Write lines to a file
Convert a data frame to a delimited string
Preprocess column for output

Column specification

The column specification describes how each column is parsed from a character vector in to a more specific data type. vroom does make an educated guess about the type of each column, but you’ll need override those guesses when it gets them wrong.

Coerce to a column specification
cols() cols_only() col_logical() col_integer() col_big_integer() col_double() col_character() col_skip() col_number() col_guess() col_factor() col_datetime() col_date() col_time()
Create column specification
cols_condense() spec()
Examine the column specifications for a data frame
Guess the type of a vector

Locale controls

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.

locale() default_locale()
Create locales
date_names() date_names_lang() date_names_langs()
Create or retrieve date names

Data generation

vroom provides a number of functions to generate datasets based on a column specification. These are mainly used for development and benchmarking, but can also be useful for reproducing bugs without requiring the original dataset.

Generate a random tibble
gen_character() gen_double() gen_number() gen_integer() gen_factor() gen_time() gen_date() gen_datetime() gen_logical() gen_name()
Generate individual vectors of the types supported by vroom

Misc tools

These functions are used as helpers for other functions, or to inspect objects.

Read lines from a file
Show which column types are using Altrep
Show which column types are using Altrep
vroom_example() vroom_examples()
Get path to vroom examples
Determine whether progress bars should be shown
Structure of objects