readStata
reads a Stata data set, stored in a file of type .dta
, into an R data frame; it provides
a front end to the read.dta13
function in the readstata13 package.
readStata(file, rownames=FALSE, stringsAsFactors=default.stringsAsFactors(),
convert.dates=TRUE)
path to a Stata .dta
file.
if TRUE
(the default is FALSE
), the first column in the
data set contains row names, which should be unique.
if TRUE
then columns containing character data are converted to
factors and factors are created from Stata value labels;
the default is taken from default.stringsAsFactors()
.
if TRUE
(the default) then Stata dates are converted to R dates.
a data frame