[ESS] Installing ESS on Mac Snow Leopard
Steve Lianoglou
mailinglist.honeypot at gmail.com
Mon Sep 5 22:14:05 CEST 2011
Hi,
On Sun, Sep 4, 2011 at 10:33 PM, ishi soichi <soichi777 at gmail.com> wrote:
> Hi. I'm trying to install R and ESS on MacOS, and I need some help there.
>
> My environment:
> MacOSX Snow Leopard
> Cocoa Emacs 23.2
> R 2.13.1
> ESS 5.14
>
> I have installed "R" with the help of http://cran.r-project.org/ .
> And it seems R-2.13.1.pkg gives two applications, namely, "R" and "R64".
> Is it OK to understand that "R64" is 64-bit application?
That is correct -- but keep in mind that this a GUI application that
is running R. This is *not* want you want to be launching via ESS.
> R does start up without Emacs and it works fine. The problem occurs when
> using it on Emacs.
>
> I need to make Emacs recognize "R" and ess. So my setting in .emacs file is
>
> (setq exec-path (cons "/Applications/R64.app/bin" exec-path))
> (setq load-path (cons "~/.emacs.d/esslisp" load-path)) ;;here it contains
Don't do the lines above.
When you install R using the *.pkg, it will drop a symbolic link
`/usr/bin/R` which points to the correct `R` command for your
"current" R install -- this is what you want to launch via ESS.
Unless you've really shot yourself in the foot somewhere, `/usr/bin`
should already be in your PATH (exec-path), so there really isn't much
more configuration you need to do.
So, after you install R via the dmg/pkg, and then properly install ESS
(there isn't much configuration to do, mind you), you should be able
to just `M-x R <ret>` and fire up R inside emacs.
If R isn't launching in 64-bit mode by default, this can be fixed.
In my ~/.bash_profile I have a line like so:
export R_ARCH=/x86_64
Which ensures R launches in 64bit mode whenever I fire it up from the terminal.
Just to make sure that emacs also always sets this environment var
anyway I launch it (from terminal, or from Emacs.app -- getting cocoa
apps to load the proper environment variables requires mucking about
with some enviroment.plist (google for it)), I also have this line in
one of the config.el files that emacs reads during startup (I guess
you can just put it in your .emacs file if that's all you got):
(setenv "R_ARCH" "/x86_64")
Which ensures that var is set.
I'm not sure if the above is necessary anymore, but R always fires up
in 64 bit mode for me these days, and I just haven't messed around
with it for a while since it has just been working for a long time
now.
Hope that helps,
-steve
> all .el files
> (require 'ess-site)
> (setq auto-mode-alist
> (cons (cons "\\.r$" 'R-mode) auto-mode-alist))
>
> It gives an error
>
> ERROR:ess-site.el:ess-etc-directory
> Relative to ess-lisp-directory, one of the following must exist:
> ../etc/ess, ../etc, ../../etc/ess or ./etc
>
>
> And it does not seem to work at all.
> Could anyone point out where the problem is?
>
> soichi
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>
--
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 ESS-help
mailing list