Description Usage Arguments Details Value Author(s) See Also Examples
Export datasets into different formats
1 | export_data(data, file, text.format = "csv", ...)
|
data |
a matrix or data frame |
file |
quoted string with the file name |
text.format |
rules for text files |
... |
further options for |
The function will try to select the proper filter based on the file extension. Valid file types are those supported by the package foreign. There are rules implemented for Stata up to version 9 (*.dta) and xBase files up to version 4 (*.dbf). Excel files (*.xls) are no longer supported. R binary files (*.rda) can also be written directly by the function.
Several text formats can be written by setting text.format
or passing options through ...
. If none of the above proprietary formats extension is part of the file name, the function will save the data frame in ASCII text format disregarding the extension. Available options for text.format
are "csv"
for comma separated values, "tab"
for columns separated by a tab character and "spc"
for space separated columns and, also, its variants for comma as the decimal separator, "csv2"
, "tab2"
and "spc2"
.
This function does not return a value.
Washington Junger wjunger@ims.uerj.br and Antonio Ponce de Leon ponce@ims.uerj.br
1 2 | data(admrio)
export_data(amdrio,"amdrio.dta")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.