stata.get {Hmisc} | R Documentation |
Reads a file in Stata version 5-8 or 7/SE binary format into a data frame.
stata.get(file, lowernames = FALSE, convert.dates = TRUE, convert.factors = TRUE, missing.type = FALSE, convert.underscore = TRUE, warn.missing.labels = TRUE, force.single = TRUE)
file |
input SPSS save file. May be a file on the WWW, indicated
by file starting with 'http://' . |
lowernames |
set to TRUE to convert variable names to
lower case |
convert.dates |
see read.dta |
convert.factors |
see read.dta |
missing.type |
see read.dta |
convert.underscore |
see read.dta |
warn.missing.labels |
see read.dta |
force.single |
set to FALSE to prevent integer-valued
variables from being converted from storage mode double to
integer |
stata.get
invokes the read.dta
function in the
foreign package to read an STATA file, with a default output
format of data.frame
. The label
function is used to
attach labels to individual variables instead of to the data frame as
done by read.dta
. By default, integer-valued variables are
converted to a storage mode of integer unless
force.single=FALSE
. Date variables are converted to R
Date
variables. By default, underscores in names are converted to periods.
A data frame
Charles Dupont
read.dta
,cleanup.import
,label
,\label{data.frame}
,Date
## Not run: w <- stata.get(\sQuote{/tmp/my.dta}) ## End(Not run)