Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Run R through state - rsource


From   Daniel Feenberg <feenberg@nber.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Run R through state - rsource
Date   Wed, 7 Sep 2011 08:45:04 -0400 (EDT)


On Tue, 6 Sep 2011, Daniel Marcelino wrote:

Hi all,

I'm trying to figure out how 'rsource' - a user written package could
works on Mac. Basically, this package send R commands through Stata
prompt. To do so, it needs to find and execute R on background.
The command works fine on Windows, under Mac environment, however, I'm
not able to get it working.
I've asked the Roger Newson who wrote this package, but unfortunately
he doesn't have a clue on this. I'm wondering if someone else has seen
it before.
The following line tells Stata to find the R application and run it,
however, I've had no answer in my screen.


global Rterm_path "/Applications/R64.app/Contents/MacOS/R"
global Rterm_options `"--vanilla"'
rsource using mytest.R

I am not a Mac user, but since no one else has responded, I can suggest a few steps to take.

Open a terminal window and enter

 /Applications/R64.app/Contents/MacOS/R

Does R run? If not, you have found the problem, and just need to find the solution. Try:

 whereis R

and that should tell you the correct path. It is possible that setting the path to just "R" would work, and that setting the full path is just making trouble.

Dan Feenberg



Daniel

--
About me: http://danielmarcelino.zip.net/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index