write.tab | R Documentation |
calls write.table with (personally) useful default values for the arguments.
if open=TRUE
, tries to open the file in the default txt viewer.
write.tab(
x,
file = NULL,
sep = "\t",
name_rn = NULL,
row.names = FALSE,
col.names = !is.null(colnames(x)),
quote = FALSE,
fileEncoding = "UTF-8",
open = TRUE,
...
)
x |
Objekt to be written. |
file |
Filename. DEFAULT: NULL = [name of x].txt |
sep |
Column separator. DEFAULT: "\t" |
name_rn |
If not NULL, this will be used as the name for a prepended column with the rownames. DEFAULT: NULL |
row.names |
Should rownames be written in a pre-column that will
mess up alignment with column names?
Use |
col.names |
Should colnames be written? DEFAULT: TRUE if x has colnames |
quote |
Write quatation marks around charstrings? DEFAULT: FALSE |
fileEncoding |
Encoding of charstrings. DEFAULT: "UTF-8" |
open |
Try to open the output file? DEFAULT: TRUE |
... |
Further arguments passed to |
full filename
Berry Boessenkool, berry-b@gmx.de, Sep 2021
write.tab
# Don't run on CRAN test machines:
## Not run:
write.tab(iris)
write.tab(iris, "otherfile.txt")
write.tab(freeny)
write.tab(freeny, name_rn="Time")
unlink("iris.txt")
unlink("otherfile.txt")
unlink("freeny.txt")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.