epi_write | R Documentation |
epi_write() writes files with a consistent convenience function. Wraps data.table's fwrite with several assumptions as defaults.
epi_write(
file_object = NULL,
file_name = "my_file.tsv",
row.names = FALSE,
quote = FALSE,
sep = "\t",
na = "NA",
col.names = TRUE,
...
)
file_object |
Object to write |
file_name |
file name as a string, default is 'my_file.tsv' |
row.names |
as for data.table::fwrite(), default is also FALSE |
quote |
as for data.table::fwrite(), default is FALSE |
sep |
as for data.table::fwrite(), default is tab separated |
na |
as for data.table::fwrite(), default is 'NA' |
col.names |
as for data.table::fwrite(), default is also TRUE |
... |
pass any other data.table::fwrite() parameters |
None
Other parameters as specified by data.table::fwrite() You are probably better off using the standard write.csv(), data.table::fwrite() directly or other functions unless you are writing out several similarly constructed objects. Files are written with data.table. Column names are written, row names are not, quotes are not used. Columns are tab separated. NAs are written as 'NA'. Assumes the first row in the object is a header.
Antonio Berlanga-Taylor <\url{https://github.com/AntonioJBT/episcout}>
fwrite
## Not run:
epi_write(some_dataframe, 'some_dataframe.tsv')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.