write.taf {TAF} | R Documentation |
Write TAF Table to File
Description
Write a TAF table to a file.
Usage
write.taf(x, file = NULL, dir = NULL, quote = FALSE, row.names = FALSE,
fileEncoding = "UTF-8", underscore = TRUE, ...)
Arguments
x |
a data frame in TAF format. |
file |
a filename. |
dir |
an optional directory name. |
quote |
whether to quote strings. |
row.names |
whether to include row names. |
fileEncoding |
character encoding for output file. |
underscore |
whether automatically generated filenames (when
|
... |
passed to |
Details
Alternatively, x
can be a list of data frames or a string vector of
object names, to write many tables in one call. The resulting files are named
automatically, similar to file = NULL
.
The default value file = NULL
uses the name of x
as a filename,
so a data frame called survey.uk
will be written to a file called
‘survey_uk.csv’ (when underscore = TRUE
) or ‘survey.uk.csv’
(when underscore = FALSE
).
The special value file = ""
prints the data frame in the console,
similar to write.csv
.
Value
No return value, called for side effects.
Note
This function gives a warning when column names are missing or duplicated,
unless the target directory name is report
. It also gives a warning if
the data frame has zero rows.
See Also
write.csv
is the underlying function used to write a table to a
file.
read.taf
reads a TAF table from a file into a data frame.
taf2html
converts TAF table to HTML.
TAF-package
gives an overview of the package.
Examples
## Not run:
write.taf(catage.taf, "catage.csv")
catage <- read.taf("catage.csv")
write.taf(catage)
file.remove("catage.csv")
## End(Not run)