rscript released

David Molitor and I released a new Stata command, rscript.

rscript calls R scripts from Stata, and allows the user to specify arguments. Here is an example.

* Stata: OLS with robust standard errors
sysuse auto, clear
reg price mpg, robust

* R: OLS with robust standard errors
tempfile auto output
save "`auto'", replace
rscript using ols_robust.R, args("`auto'" "`output'")

* Read in the R results
insheet using "`output'", comma clear
list

More information is available at the link above.