df_to_txt | R Documentation |
Save any list like data.frame, data.table or matrix to a txt-file. Uses data.table::fwrite or vroom::vroom_write depending on decimal mark. If decimal mark is ., then uses faster vroom_write. Otherwise uses fwrite.
df_to_txt( x, file = "", sep = "\t", dec = ",", overwrite = TRUE, encoding = "UTF-8", ... )
x |
Any list like element e.g. data.frame and data.table. |
file |
Output file name. Default: to the console. |
sep |
Separator. Default: "tab" |
dec |
Decimal limiter. Default: "," |
overwrite |
Overwrites the file, it it exists. Default: TRUE |
... |
Add parameters to fwrite or vroom_write. col.names |
n <- c(1.1, 2.2, 3.3) s <- c("a", "b", "c") x <- data.frame(n, s) df_to_txt(x, file = "example.txt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.