[R] How to start R in mac with the current directory as the current working directory?

Peng Yu pengyu.ut at gmail.com
Thu Oct 8 19:14:38 CEST 2009


On Thu, Oct 8, 2009 at 10:57 AM, Steve Lianoglou
<mailinglist.honeypot at gmail.com> wrote:
> Hi Peng,
>
> On Oct 8, 2009, at 11:21 AM, Peng Yu wrote:
>
>> Hi,
>>
>> I installed R on mac (see below). When I start it from a terminal by
>> the following command, the current working directory is always '~' no
>> matter where my current directory is in the terminal. I'm wondering if
>> there is a way to make the gui R on mac inherent the current directory
>> from the terminal.
>>
>> /Applications/R.app/Contents/MacOS/R
>
> Look in the R > Preferences >Startup dialog under the "Initial working
> directory" section. You'll see you can run this from the command line in
> order to open R.app within a given directory:
>
> $ open -a R.app <dir-or-file>
>
> So, to open in the current directory, just type:
>
> $ open -a R.app .
>
> You can make an alias for this and set it in your .bash_profile in order to
> make your life easier, maybe:
>
> alias r="open -a R.app ."
>
> Small r so it doesn't interfere with /usr/bin/R
>
> Hope that helps,

I installed http://r.research.att.com/R-2.9.2.pkg

Then, I run the following command in a terminal.

open -a /Applications/R64.app/Contents/MacOS/R .

I get the following errors in the gui window. If run
/Applications/R64.app/Contents/MacOS/R directly, I'll not get the
errors. I'm wondering what the problem is. How to fix it?

SystemFlippers: didn't consume all data for long ID 0 (pBase =
0x101bd1b80, p = 0x101bd1b84, pEnd = 0x101bd1b88)
SystemFlippers: didn't consume all data for long ID 0 (pBase =
0x114241120, p = 0x114241124, pEnd = 0x114241128)

Regards,
Peng




More information about the R-help mailing list