0

I have a client who wishes to convert Stata(dta) files to CSVs, though googling around I have managed to find that you can read DTA files using R, I don't know R but once I get the data into Java it should be simple enough.

I found Renjin, an R interpreter for Java unfortunately there are no tools inside Renjin to load DTA files and no way I can figure out to load the known solutions (1 or 2) into the Renjin library.

Is there some other way to do this? Something I am missing with Renjin?

The only other method is using Jython and Pandas, A work around that may be too complex for my client to configure properly.

Community
  • 1
  • 1
glend
  • 1,592
  • 1
  • 17
  • 36
  • It is simple enough from within R: Check out packages: "foreign" and function "read.dta", then "write.csv". – s_baldur Jul 30 '16 at 18:34
  • I have, but I don't know how to run R scripts within Java to be able to program around it. – glend Jul 30 '16 at 18:36
  • Sorry. My misunderstanding. – s_baldur Jul 30 '16 at 18:39
  • Curious, does your client not have Stata which maintains the [`outsheet()`](http://www.stata.com/help.cgi?outsheet) command to output to .csv. How did you get .dta files in first place it? – Parfait Jul 30 '16 at 21:20
  • He has Strata, but he isn't a programmer, it was delivered to him by another company who say that the database files cannot be read using other means. He feels that the process of exporting the data to CSV is too complex and a waste of time, he wishes to automate the exporting of data. – glend Jul 30 '16 at 21:24

0 Answers0