This function accepts a filename and tries to return a valid function for reading it.
Details
guess_read_function
understands the following file extensions:
rds with
readRDS
csv, csv.gz, csv.xz with
utils::read.csv
tsv, tsv.gz, tsv.xz with
utils::read.delim
parquet with
arrow::read_parquet
txt, txt.gz, txt.xz with
readLines
json, json.gz, json.xz with
jsonlite::fromJSON
See also
Other pb_rw:
guess_write_function()
,
pb_read()
,
pb_write()