Use convert.factors = NA to override this. Ordinarily, read.dta will not convert a variable to a factor unless a label is present for every level. The data label, variable labels, timestamp, and variable/dataset characteristics are stored as attributes of the data frame.īy default Stata dates (%d and %td formats) are converted to R's Date class, and variables with Stata value labels are converted to factors. The variables in the Stata data set become the columns of the data frame.
STATA 12 SOFTWARE HOW TO
( https: is only supported on some platforms.) How To Cite Stata Version 12 If the filename appears to be a URL (of schemes http:, ftp: or https:) the URL is first downloaded to a temporary file and then read. Warn if a variable is specified with value labels and those value labels are not present in the file. missing.typeįor version 8 or later, store information about different types of missing data? convert.underscoreĬonvert '_' in Stata variable names to '.' in R names? Use Stata value labels to create factors? (Version 6.0 or later). convert.datesĬonvert Stata dates to Date class, and date-times to POSIXct class? convert.factors Keywords file Usage Arguments fileĪ filename or URL as a character string. Reads a file in Stata version 5-12 binary format into a data frame.įrozen: will not support Stata formats after 12. Collect your results into reproducible reports. Stata is the solution for your data science needs. If you are using Stata 13 and want to save a file so that it may be read by someone using Stata 11 or Stata 12, simply use the saveold command. Stata 11 can also read Stata 12 datasets. Saveold saves the dataset currently in memory on disk under the name filename in Stata 12 format.