Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Request regarding conversion of Stata code

From   "Roger B. Newson" <>
Subject   Re: st: Request regarding conversion of Stata code
Date   Mon, 03 Jun 2013 10:26:50 +0100

Thanks to Andrew for the plug for -rsource-. For -rsource- users, converting datasets from Stata to R and back is the easy part, as the R community has 2 packages -read.dta- and -write.dta- which can read and write Stata datasets directly, and which seem to be updated promptly following each new Stata version. There should therefore be no need for intermediate .csv files.

Best wishes


Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Web page:
Departmental Web page:

Opinions expressed are those of the author, not of the institution.

On 01/06/2013 09:37, wrote:
Hello Mike,

Another option is to use Roger Newson's -rsource- from SSC to run
blocks of R code from inside Stata. This allows you to at least
document/log the entire analysis in one place, but can sometimes
require outputting .csv files from Stata and then importing into R, so
not always the most efficient options, but might get it done.


Andrew Lover
Centre for Infectious Disease Epidemiology Research (CIDER)
Saw Swee Hock School of Public Health
National University of Singapore
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index