guess_write_function | R Documentation |
This function accepts a filename and tries to return a valid function for writing to it.
guess_write_function(file)
file |
filename to parse |
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
function for reading the file, if found
Other pb_rw:
guess_read_function()
,
pb_read()
,
pb_write()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.