Fabian_G
Fabian_G

Reputation: 431

Problem: org-babel code does not work with R

I have a frustrating problem: Just migrated to a new computer and now my org-mode does not work correctly anymore (now on OSX 10.14).

Executing the following code block:

#+BEGIN_SRC R :results output 
getwd()
#+END_SRC

Results in: /bin/bash: R: command not found. I've setup my ~/.bashrc to link to my local R so that the R command works in an emacs shell (M-x shell) however that still did not help executing org-babel code blocks in R :(

Thanks for the help!

Upvotes: 2

Views: 977

Answers (1)

Fabian_G
Fabian_G

Reputation: 431

Adding (setq org-babel-R-command "/folder/which/contains --no-save") to th e.emacs file fixed it. Found here https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html#orgc55114f

Upvotes: 2

Related Questions