write.dta {stataread} | 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 variables in the Stata data set become the columns of the data frame. Missing values are correctly handled. The data label, variable labels, and timestamp are stored as attributes of the data frame. Nothing is done with factor levels, which should end up as variable labelss.
NULL
Thomas Lumley
Stata v6.0 Users Manual describes the file format
data(swiss) write.dta(swiss,swissfile<-tempfile()) read.dta(swissfile)