Skip to main content
Share Your Experience: Take the 2024 Developer Survey
18 votes
Accepted

export R code results in org-mode?

You need to use the :exports both header argument. By default, org only exports R code, not the results. From the org manual: 14.8.2.8 :exports The :exports header argument is to specify if that part ...
Tyler's user avatar
  • 22.3k
13 votes

Emacs busy while evaluating R in ESS

While doing due research on this, I stumbled upon a small section in the ESS manual: The default value of ess-eval-visibly (t) means that ESS calls block Emacs until they finish. This may be ...
Liudvikas Akelis's user avatar
8 votes
Accepted

Insert code chunk in R Markdown with yasnippet and polymode

I ran into a similar issue, and wrote a stand-alone function to get around the weird interactions between yasnippet and polymode. The following function mimics the behaviour of the snippet you tried, ...
Tyler's user avatar
  • 22.3k
7 votes
Accepted

Install ESS with use-package

I was missing ':ensure t . Now the ess package gets automatically installed at first use. For more information on how to load packages from ELPA with package.el and use-package see: https://github....
user14419's user avatar
  • 195
6 votes
Accepted

graphing R in org-babel

You're very close! Two changes: For the R code, you'll need a few more headers: #+BEGIN_SRC R :results output graphics :file test.png library("ggplot2") ggplot(iris, aes(x = Sepal.Width, y = ...
Gastove's user avatar
  • 1,551
6 votes

Can Emacs use tramp to run in an interactive session on a remote HPC node?

I have been struggling to do the same. I found a different route that allowed me to do basically the same thing. You can open a shell buffer by M-x shell and from there connect to the login node, and ...
Joonha Park's user avatar
6 votes
Accepted

Unable to install ESS package

The julia-mode package is in MELPA, but not in MELPA Stable, so you have to add another repository. (require 'package) (add-to-list 'package-archives '("melpa-stable" . "https://stable....
matteol's user avatar
  • 2,018
5 votes

how to setup Knitr workflow in Emacs?

This is an all-in-one solution. It will create and display a PDF from an Rnw. Specifically it will: Save the Rnw buffer and knit it, Apply a given LaTeX engine to the resulting TeX file, Identify the ...
antonio's user avatar
  • 1,822
5 votes
Accepted

"Dissasociate" auto-mode for specific files (in ESS)

The issue is mostly caused by autoloads. In julia-mode.el you can see that (add-to-list 'auto-mode-alist '("\\.jl\\'" . julia-mode)) is marked as to be autoloaded. If you were to look at ~/.emacs.d/...
aplaice's user avatar
  • 2,196
5 votes
Accepted

Disable smart underscore for good ESS

I have this in my config file: ;; smart assign (setq ess-smart-S-assign-key ";") ;if ";" needed, press ";" key twice (ess-toggle-S-assign nil) (ess-toggle-underscore nil) ;leave underscore key alone!...
Arktik's user avatar
  • 972
5 votes
Accepted

Send content of region or current line to a tmp file, then execute shell script with filename as argument

If your ~/dotfiles/rundo.sh accepts stdin as input, like many other commands such as grep/wc/bash/python, to run a command with the region as stdin, simply run M-| ~/dotfiles/rundo.sh (M-| runs shell-...
xuchunyang's user avatar
  • 14.6k
5 votes
Accepted

Sending `C-c C-c` to the process window without swithcing to it

You'll need to write your own function for doing this. You'll want to read up on the functions get-buffer-process and signal-process to learn about how to send the right signal to the ESS process. ...
Jordon Biondo's user avatar
5 votes
Accepted

How to stop ESS from asking for "R starting project directory"?

You want to set ess-ask-for-ess-directory to nil. And, maybe, also check the value of ess-startup-directory, which should also be nil to use current buffer's default directory.
gusbrs's user avatar
  • 786
4 votes

ESS - stop move point to end when the buffer is updated

This behavior is controlled by comint-scroll-to-bottom-on-output. It's nil by default. You probably configured it to a different value accidentally.
VitoshKa's user avatar
  • 266
4 votes
Accepted

Why is ESS causing my emacs to start so slowly?

The immediate cause of this delay is a timeout withing the TRAMP package, that is a dependency of ESS. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810640 The hang occurs when Emacs spawns ssh ...
john candlish's user avatar
4 votes
Accepted

ESS: getting help on package

M-x ess-display-package-index, bound to C-c C-d i by default, does exactly this.
Tyler's user avatar
  • 22.3k
4 votes
Accepted

Is there a way to evaluate from top of buffer to point?

The function you are looking for is ess-eval-buffer-from-beg-to-here (bound to C-c <C-up> by default). I found this using M-x apropos "ess eval".
ebpa's user avatar
  • 7,499
4 votes
Accepted

Symbol's value as variable is void: polymode-mode-map

The error is simple: the polymode package does not define any polymode-mode-map (nor polymode-mode for that matter). Instead it defines polymode-minor-mode and corresponding polymode-minor-mode-map.
Stefan's user avatar
  • 26.5k
4 votes
Accepted

Remove key binding from `ess-extra-map`

I think you are looking for this: (define-key ess-extra-map "r" nil) Not this: (define-key ess-extra-map (kbd "C-c C-e r") nil) C-c C-e is bound to a keymap. In that keymap, r is bound to inferior-...
Drew's user avatar
  • 77.9k
4 votes
Accepted

How to add function call highlighting in ESS?

ess-R-font-lock-keywords is a user option that is mentioned in the ESS manual as: Font-lock patterns for ESS R programming mode. (There is a corresponding ess-S-font-lock-keywords for S buffers.) The ...
shir's user avatar
  • 51
3 votes

Reference a variable in a 2nd org-babel code block

A standard feature of babel blocks is each block is executed in a new interpreter. Often this is good as changes in one block doesn't mess up others. I have two ideas for you... In this particular ...
Howard Abrams's user avatar
3 votes
Accepted

ESS language modes with use-package

The file associations should all be set up for you. It works for me on Emacs 25.1 with just the following in my init: (use-package ess :init (require 'ess-site)) This will set the associations for ...
Tyler's user avatar
  • 22.3k
3 votes

ESS R error: searching for program

It's no longer required to use Rterm.exe; you can just use R.exe directly. To configure the program name that emacs/ESS uses, set the variable in your .emacs like this: (setq inferior-ess-r-program "...
axiomatic's user avatar
3 votes
Accepted

ESS poly-R issue

Installing polymode doesn't automatically install all the related modes that it uses to support different languages. The error message you see, "No such file or directory" "poly-R")" is a clue that ...
Tyler's user avatar
  • 22.3k
3 votes

Sending `C-c C-c` to the process window without swithcing to it

You can do M-x ess-interrupt.
Alex's user avatar
  • 1,048
3 votes
Accepted

Flycheck r-lintr doesn't find anything

Run C-c ! C-c for r-lintr and check the output. In my case, I discovered that flycheck was not finding the /home/user/.R/lintr_cache directory -- the problem went away once I created it.
ppanko's user avatar
  • 146
3 votes
Accepted

Run R code on selected object

Here's a quick and dirty approach. Depending on what you want there's lots of room for improvement. (defun head-at-point () (interactive) (let ((target (thing-at-point 'symbol))) (ess-send-...
Tyler's user avatar
  • 22.3k
3 votes
Accepted

ESS: display-buffer-alist reusable-frames does not work as expected

How can I make display-buffer-alist work properly without touching global settings? The fault here lies not with display-buffer, but with the ESS package, specifically the code in lisp/ess-inf.el. ...
Basil's user avatar
  • 12.5k
3 votes

Any equivalent of R+ESS for python?

I managed to set up something close to my requirements above. Here it is, for people who may have my same needs. Let me stress that such requirements are very subjective, so the set-up below is not ...
pglpm's user avatar
  • 301
3 votes
Accepted

general function to concat token at point with function and send to *R*

I'll give you an hint: (defun apply-r-func-at-point (func) "Apply R FUNC at point, FUNC should be a string." (let ((sym (ess-symbol-at-point))) (if sym (ess-send-string (get-...
Elia's user avatar
  • 181

Only top scored, non community-wiki answers of a minimum length are eligible