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

re: st: re: invoking R from Stata

From   Kit Baum <>
Subject   re: st: re: invoking R from Stata
Date   Mon, 1 Dec 2008 20:42:30 -0500

< >
Michael said

I noticed from -help rsource- that the "Rterm_path" global macro of
Roger Newson's -rsource- procedure defaults to a value of
"Rterm.exe".  In light of Kit Baum's response to David Airey (quoted
below), it seems that a more robust solution would be to replace
lines 30-32 of rsource.ado:

   if `"`rpath'"'=="" {;
     local rpath "Rterm.exe";

with the following:

   if `"`rpath'"'=="" {;
     if c(os) == "Windows" {;
       local rpath "Rterm.exe";
     else {;
       local rpath "/usr/bin/r";

If I understand Kit's message correctly, the latter executable path
is valid for any Unix-based installation of R (including on Mac
OS X).

I do have a symlink (ln -s) from a file within the package to / usr/bin/r. I don't recall having made that link myself, and it is dated the same date as the directory (yes, OS X .apps are really directories---as is, so I imagine the R installer probably created the symlink (with my permission, as it is owned by root). It would be sensible for Roger N. to do something like

local rpath = cond(c(os) == "Windows", "Rterm.exe", "/usr/bin/r")

to make his routine platform-independent.

Kit Baum, Boston College Economics and DIW Berlin
An Introduction to Modern Econometrics Using Stata:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index