Skip to content
Prev 47504 / 63424 Next

Stata support in package foreign

As you know, Stata support in 'foreign' was frozen a while back at Stata 
version 12. R-core has received a request from a grad student to 'give 
top priority' to supporting Stata 13.  That is not going to happen, not 
least because none of us has access to Stata.

However, according to Stata's documentation both Stata 12 and 13 use 
format 115, so foreign::read.dta should be able to read Stata 13 files. 
  It would be helpful to know if that is the case.

Second, Stata document reading R's POSIXct date-times into Stata at 
http://www.stata.com/manuals13/ddatetime.pdf page 10 using format %tC. 
The description there of 'UTC-adusted seconds' is ambiguous, but what is 
said on page 2 suggests %tc is correct.  Could someone please try 
reading a recent R date-time into Stata (one since July 2012, the last 
leap second) and see which format reads it correctly.

Finally, PR#15517 is about undocumented details of a change in the way 
Stata saves dates.  It would be helpful if someone could send me two 
example Stata 12/13 files, one containing a column of dates and one 
containing a column of date-times together with a printout of what Stata 
interprets them as.

Thanks for any help,

BDR