Convert a dta file to csv without Stata software

前端 未结 11 2110

Is there a way to convert a dta file to a csv?

I do not have a version of Stata installed on my computer, so I cannot do something like: <

11条回答
  •  一个人的身影
    2020-11-30 22:22

    Another way of converting between pretty much any data format using R is with the rio package.

    • Install R from CRAN and open R
    • Install the rio package using install.packages("rio")
    • Load the rio library, then use the convert() function:

      library("rio")
      convert("my_file.dta", "my_file.csv")
      

    This method allows you to convert between many formats (e.g., Stata, SPSS, SAS, CSV, etc.). It uses the file extension to infer format and load using the appropriate importing package. More info can be found on the R-project rio page.

提交回复
热议问题