Skip to contents

Read from or write to tabular files, with file format inferred from the file extension.

Usage

read_tabular(path_to_file, ...)

write_tabular(table, path_to_file, simplify_column_types = TRUE, ...)

write_tabular_file(table, path_to_file, simplify_column_types = TRUE, ...)

read_tabular_file(path_to_file, ...)

Arguments

path_to_file

Path to the file to read/write. Must have extension .tsv, .csv, or .parquet (not case-sensitive).

...

Additional keyword arguments passed to the file reader/writer function, which will be one of readr::read_csv() / readr::write_csv(), readr::read_tsv() / readr::write_tsv(), and arrow::read_parquet() / arrow::write_parquet(), depending on the file format.

table

Table to write (write_tabular only).

simplify_column_types

If TRUE, attempts to convert extension arrays (e.g. fs paths, glue strings) to plain base R vectors before writing.

Value

For read_tabular, the result of reading in the file, as a tibble. For write_tabular, nothing, saving the tabular to disk as a side effect.