Emacs on Mac, R, and OS X el Capitan

I use Emacs and / or Aquamacs on a Mac system to edit R, latex and html code. After updating OS X to El Capitan R, it stopped working (program search: no such file or directory, R). I was wondering if anyone ran into the same problem and found a solution.

+1
source share
7 answers

This is what I did and solved the problem.

  • reinstall R (the latest version at the time of this writing is 3.2.4)
  • include (setq exec-path (cons "/ usr / local / bin" exec-path)) in .emacs. / usr / local / bin, where the R command line is softlinked.

Of course, if the R command is not found in / usr / local / bin, but somewhere else, you must change the path in step 2.

+3
source

I had to reinstall R and all packages after the upgrade. To make this step easy, save the installed packages in a file before upgrading to El Capitan. The packages are not actually removed, they are located in /Library/Frameworks/R.Framework/Versions/3.2/Resources/library (3.2 = version), so you can still find them, but some of them may be in your user library.

To save the package list:

my.packages = library () [[2]] write.table (my.packages, file = "my.packages.txt", row.names = F, col.names = T)

Then update, reinstall from R-3.2.2.pkg (or the last one), then read the text file in my.packages and use install.packages (my.packages, repos = ' http: //cran.us.r-project. org ') and you should be good to go.

+1
source

As for R under "El Capitan", you do not have to reinstall it. You can find out what happened by specifying a directory

ls -l /Library/SystemMigration/History/Migration-<UUID>/QuarantineRoot/usr/bin

(where <uuid> looks like 38CF2251-9593-48E9-BAA4-4880AA47E908 ). This is where the OS update placed the links that were used to work in /usr/bin . Just create the same symbolic links to R and Rscript as root:

 cd /usr/local/bin ln -s /Library/Frameworks/R.framework/Resources/bin/RR ln -s /Library/Frameworks/R.framework/Resources/bin/Rscript Rscript 

This assumes, of course, that /usr/local/bin is in your PATH .

New R installations must be aware of changes to El Capitan, cf. this error report is R.

+1
source

Here is another solution: replace emacs with `` modified emacs ''. It solves all problems with Auctex (latex-preview-mode) and R. It is also consistent with OS 10.11.

You can download it from: http://vgoulet.act.ulaval.ca/en/emacs/mac/

0
source

I had the same problem as R to work for El Capitan. Now the problem is resolved. What follows is what I tried. You may find some of the steps that do not matter, but I have included them for completeness.

then download and install: (i) R-3.2.2.pkg and run the checksum command in the terminal according to the instructions. (ii) XQuartz 4. Then they typed R in the terminal and it worked.

  1. The course I'm doing needs other packages or libraries. To download the "geonames" package, in the "Terminal Type": install.packages (with ("GeoNames"))

    A message appears asking you to select a CRAN mirror. Another window will open with a list of mirrors, click one and OK.

Similarly, the package 'UsingR' was downloaded: install.packages (with ("UsingR"))

__ end

0
source

I think the problem is that usr/bin can no longer be written. And what is where programs like R and Rscript were implemented. On my system, it looks like usr/bin been moved to something like:

/Library/SystemMigration/History/Migration-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/QuarantineRoot/usr/bin

I suppose you can add this quarantined folder to your path, since everything works fine on my system if it runs from there.

0
source

I had the same problem. I'm not sure what has changed in El Capitan, but adding the path to the binary R ( /usr/local/bin on my system) to exec-path in my .emacs file fixed the problem for me.

-1
source

Source: https://habr.com/ru/post/1244809/


All Articles