[Bioc-devel] emacs, ess, R, mac os [was Re: running devel and release versions of R and bioc on mac os?]

Paul Shannon pshannon at systemsbiology.org
Wed Jul 20 22:00:55 CEST 2011

Hi Steve,

I run R in

  GNU Emacs 22.1.1 (mac-apple-darwin)
  iTerm build 0.10, 
  os x 10.6.8, 
  ess 5.11 (I should upgrade) 

and never see any of the problems you report.  I'm not sure where the key difference might lie.

 - Paul
On Jul 20, 2011, at 12:37 PM, Steve Lianoglou wrote:

> Ahh .. thanks for sharing!
> I've always jut had the "official" releases installed and use them to
> run the latest (official) version of R, and have been relying on
> compiling R-devel into /usr/local/whatever to run R-devel.
> I made symlinks for R-devel to point to the R script in my devel's bin
> directory and just worked with things this way.
> I'll try to give your way a shot, thanks!
> Also -- this is way OT (sorry!), but I'm not sure where to ask this
> question and it seems that you and Paul run R in a similar way as I
> do.
> In particular I run emacs/ess through the terminal (iTerm2 actually).
> I can sometimes get emacs to freeze up (while running in terminal) if
> I'm scrolling up/down in a buffer (using the arrows), and if the
> cursor hits, say "the ceiling" of the buffer, it will sometimes get
> stuck there and the whole terminal just locks up. (I'm also typically
> using gnu/screen).
> Other times I find that R somehow just "force quites" when I'm running
> it through ess.
> Do you guys run a somehow-similar setup? And does this ever happen to
> you guys at all?
> Currently on osx.6.8, ess 5.13 and emacs 23.3 (from emacsforosx.com)
> Thanks,
> -steve
> On Wed, Jul 20, 2011 at 12:14 PM, Kasper Daniel Hansen
> <kasperdanielhansen at gmail.com> wrote:
>> Yes.
>> A full install on OS X installs R into
>> # ls -l /Library/Frameworks/R.framework/Versions/
>> total 8
>> drwxrwxr-x  7 root  admin   238B Jul 10 13:06 2.13
>> drwxrwxr-x  6 root  admin   204B Jul 10 12:56 2.14
>> lrwxr-xr-x  1 root  admin    45B Jul 10 13:06 Current ->
>> /Library/Frameworks/R.framework/Versions/2.13
>> As you can see on my system there are version directories and then a
>> symlink from "Current" to whatever version is current (under some
>> definition).  The Rswitch utility essentially switches this symlink
>> around.
>> If you grab the nighties (the tar.gz and _not_ the pkg) from
>> r.research it looks to be compiled code that simply adds a new
>> directory under /Library/Framework/R.framework (you should check
>> this).  But it also overwrites the "Current" link so that "Current"
>> points to 2.14. Using an installer tends to create a new directory,
>> but remove the old ones; this is why people complain about missing old
>> versions.
>> Now, assuming you have two (full) directories under OS X you need the following
>>  (1) decide which version should be "R" (in my script below that is
>> always latest stable release)
>>  (2) make some simple scripts/symlinks that start the other versions of R
>>  (3) (this is the tricky part) Make sure that the R scripts installed
>> inside /bin directories deep in the Framework dirs are modified
>> because (unfortunately) on mac certain paths are hardcorded.
>> This script does all of it, and it needs to be run with sudo post
>> installation (and you need to run it every time you re-install a
>> nightie).  Based on what I see in the current tarball
>> (R-devel-leopard-universal.tar.gz), this script should work with the
>> nighties tarball.
>> #!/bin/bash
>> sudo ln -f -s /Library/Frameworks/R.framework/Versions/2.13/Resources/R
>> /usr/bin/R-2.13
>> sudo ln -f -s /Library/Frameworks/R.framework/Versions/2.13/Resources/Rscript
>> /usr/bin/Rscript-2.13
>> sudo ln -f -s /Library/Frameworks/R.framework/Versions/2.14/Resources/R
>> /usr/bin/R-devel
>> sudo ln -f -s /Library/Frameworks/R.framework/Versions/2.14/Resources/Rscript
>> /usr/bin/Rscript-devel
>> sudo ln -f -s /Library/Frameworks/R.framework/Versions/2.13/Resources/R
>> /usr/bin/R
>> sudo ln -f -s /Library/Frameworks/R.framework/Versions/2.13/Resources/Rscript
>> /usr/bin/Rscript
>> sudo rm /Library/Frameworks/R.framework/Versions/Current
>> sudo ln -f -s /Library/Frameworks/R.framework/Versions/2.13
>> /Library/Frameworks/R.framework/Versions/Current
>> sudo sed -i tmp
>> "s|R.framework/Resources|R.framework/Versions/2.13/Resources|"
>> /Library/Frameworks/R.framework/Versions/2.13/Resources/bin/R
>> sudo sed -i tmp
>> "s|R.framework/Resources|R.framework/Versions/2.14/Resources|"
>> /Library/Frameworks/R.framework/Versions/2.14/Resources/bin/R
>> The first 6 lines just sets up symlinks in /usr/bin  (R (pointing to
>> 2.13), R-2.13 and R-devel, expand as needed for more versions).  That
>> is, they solve (1) above
>> The next two lines makes sure that Current links to 2.13, solving (2) above
>> The last line fixes the hard-coded path in the scripts, solving (3) above.
>> Kasper
>> On Wed, Jul 20, 2011 at 11:57 AM, Paul Shannon
>> <pshannon at systemsbiology.org> wrote:
>>> Thanks, Kasper.
>>> I, too, run R from emacs using ESS, and my hope is to run (with or without ESS) the two versions in separate buffers, making for easy comparisons in a familiar environment.
>>> Rather than building from source, I am inclined to get the latest build from
>>>  http://r.research.att.com/#nightly
>>> Any further suggestions?
>>> Thanks!
>>>  - Paul
>>> On Jul 20, 2011, at 8:34 AM, Kasper Daniel Hansen wrote:
>>>> I do this routinely, but I access R from the terminal or from within
>>>> Emacs, using ESS.  I also compile R myself.
>>>> It is possible to do this using the Rgui by using the Rswitch
>>>> application, but that depends quite a bit on how you install R-devel
>>>> (installer (is that possible?), compile or untar compiled code).
>>>> However, using Rswitch you will only ever have a single R running.  If
>>>> you want to run them side by side I think you need to modify stuff
>>>> (which I do and which is not that hard).
>>>> This seems like a reasonable request so I wonder what other people do
>>>> (although I predict most people will say compile from source).
>>>> Kasper
>>>> On Wed, Jul 20, 2011 at 11:16 AM, Paul Shannon
>>>> <pshannon at systemsbiology.org> wrote:
>>>>> Are there any special techniques you can advise me of, for installing and running two concurrent R/bioc versions installed on Mac OS?
>>>>> I wish to have the latest build of the devel version without sacrificing the current release as well.
>>>>> Thanks,
>>>>>  - Paul
>>>>> _______________________________________________
>>>>> Bioc-devel at r-project.org mailing list
>>>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
> -- 
> Steve Lianoglou
> Graduate Student: Computational Systems Biology
>  | Memorial Sloan-Kettering Cancer Center
>  | Weill Medical College of Cornell University
> Contact Info: http://cbio.mskcc.org/~lianos/contact

More information about the Bioc-devel mailing list