Created
April 18, 2013 01:07
-
-
Save christophergandrud/5409072 to your computer and use it in GitHub Desktop.
the `stataDo` function does not currently work. More of an aspiration than a reality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############ | |
# stataDo: A function for running Stata do files in batch mode from R | |
# Christopher Gandrud | |
# 22 January 2013 | |
############ | |
# Note: Stata must be in your PATH for this to work. | |
## For Mac Users see: http://www.stata.com/support/faqs/mac/advanced-topics/ | |
stataDo <- function(dofile, options = "-e"){ | |
system(paste("bash ;", "Stata", options, dofile, "; exit", sep = " ")) | |
} | |
setwd("~/Desktop/") | |
stataDo(dofile = "AMCCRR.do") | |
system("Stata -e") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment