write.foreign: Write Text Files and Code to Read Them
Description
This function exports simple data frames to other statistical packages by
writing the data as free-format text and writing a separate file of
instructions for the other package to read the data.
Other arguments for the individual writeForeign functions
Value
None
Details
The work for this function is done by
foreign:::writeForeignStata, foreign:::writeForeignSAS and
foreign:::writeForeignSPSS. To add support for another package,
eg Systat, create a function writeForeignSystat with the same first
three arguments as write.foreign. This will be called from
write.foreign when package="Systat".
Numeric variables and factors are supported for all packages, dates and times
(Date, dates, date, and POSIXt classes) are
also supported for SAS and characters are supported for SPSS.
For package="SAS" there are optional arguments dataname="rdata"
taking a string that will be the SAS data set name and
validvarname taking either "V6" or "V7".