This function accepts a filename and tries to return a valid function for writing to it.
Details
guess_write_function
understands the following file extensions:
rds with
saveRDS
csv, csv.gz, csv.xz with
utils::write.csv
tsv, tsv.gz, tsv.xz with a modified
utils::write.csv
where sep is set to"\t"
parquet with
arrow::write_parquet
txt, txt.gz, txt.xz with
writeLines
json, json.gz, json.xz with
jsonlite::write_json
See also
Other pb_rw:
guess_read_function()
,
pb_read()
,
pb_write()