write.dta {foreign} | R Documentation |
Writes the data frame to file in the Stata v6.0 binary format. Does not write matrix variables.
write.dta(dataframe, filename)
dataframe |
a data frame |
filename |
character string giving filename |
The columns in the data frame become variables in the Stata data set. Missing values are correctly handled. Nothing is done with factor levels, which should end up as variable labels.
NULL
Thomas Lumley
Stata v6.0 Users Manual describes the file format
data(swiss) write.dta(swiss,swissfile<-tempfile()) read.dta(swissfile)