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

Questions tagged [r]

R is a free software environment for statistical computing and graphics. R can be run from within Emacs using the ESS (Emacs Speaks Statistics) package, which also provides a major mode for editing `.R` files.

Filter by
Sorted by
Tagged with
0 votes
0 answers
39 views

MIT-MAGIC-COOKIE error Emacs terminals

I get Invalid MIT-MAGIC-COOKIE-1 key while I try to open an x11() window using R from within Emacs. I try both vterm, eshell, shell and ssh and all return the same error. If I try the same from ...
0 votes
2 answers
105 views

Installed polymode from Melpa, but everything comes up in Fundamental mode

I've been happily using polymode to edit Rmarkdown documents for many years. I had installed it and configured it manually, and it was fine until the sysadmins upgraded emacs from 24 to 27. The file I ...
1 vote
1 answer
301 views

Proper formatting of R help pages in eldoc-doc-buffer using eglot

I am using eglot with R and ESS. If I have the following R script, with eglot enabled (saved as test.R: lm And I place my cursor on lm then a temporary eldoc-buffer pops showing the first few rows of ...
0 votes
1 answer
22 views

ESS-View not working

I have just installed ess-view, following the steps outlined in the installation section here. Let's say I have the following dataframe: x <- sample(1:10, size = 100, replace = TRUE) y <- sample(...
0 votes
0 answers
118 views

Importing org-mode table into R using `read.table()`

I see a related question has already been asked, but it misses my particular use case. If I have an org-mode table with some data, and I want to import it into an R session, using read.table. However, ...
2 votes
1 answer
23 views

ESS: are there "special" breakpoints for pipes?

The ESS Manual announces a new feature as of v16.04: ESS[R]: New specialized breakpoints for debugging magrittr pipes However there is no other mention of these "specialized" breakpoints ...
1 vote
1 answer
40 views

ESS: not start new R process for different file

I often share an R process with multiple .R files. The default in ESS when I ess-eval-line-invisibly-and-step from a new file within a different R package I develop is to create a new R process. The ...
0 votes
1 answer
56 views

Get emacs to open R terminal on right frame

I wanted to change the behaviour of the standard emacs C-x 3 key-binding, so that instead of dividing the existing size of the frame into two windows, I wanted emacs to double the width of the window ...
0 votes
1 answer
63 views

Smart underscore and auto-complete not working with ESS installed from MELPA

I am using Emacs 26.4 from ubuntu repository on ubuntu 20.04. I have swtiched from ESS by the ubuntu repository to the MELPA ESS, in order to have ESS working with R-4 (see this: ESS start process ...
1 vote
2 answers
90 views

ESS R: how to get TAB-completion when editing .R-files?

When editing an .R-file I see that ess-r-mode is on ("ESS[R]" in the status line). If an R session is opened in another buffer, I see that inferior-ess-r-mode is on there ("iESS [R:1]&...
8 votes
1 answer
6k views

export R code results in org-mode?

I want to execute R code blocks in org-mode and export the results to a PDF/html. Here is an example: Some text here... #+begin_src R :results output latex library(xtable) x <- rnorm(100) y <...
4 votes
3 answers
868 views

Org mode: execute region in session

I'm looking for an easy way to highlight a chunk of text inside a Babel source block (not the entire block) and execute that inside the current session (creating the new session buffer if necessary). ...
35 votes
3 answers
4k views

ESS plot directly to an Emacs buffer?

Q: how can I get ESS (R) to plot directly to an Emacs buffer? When interacting with R through ESS, R defaults to spawning a separate graphics window outside of Emacs to draw its plots. (One can, of ...
2 votes
2 answers
371 views

Evaluate Single Python Code Blocks in a Quarto File like in R Studio or Jupyter Lab

Quarto is a literate programming framework. It allows you to combine in a single file code (in various programming languages) and text (in markdown).* When a Quarto document is rendered, the output ...
2 votes
2 answers
69 views

Creating scratch R files

Often I want to create a temporary R file and don't want to save the file or name the file. Is there a way to achieve this outside of using C-x C-f and naming a file? For example, in VSCode or Rstudio ...
1 vote
1 answer
33 views

textual edits of R script drives up R process cpu load (ESS)

I'm using ESS (emacs speaks statistics) to edit R code. Once the R process is running, every textual edit in the buffer imposes substantial computational demand onto the R process (which I see top in ...
1 vote
0 answers
101 views

Can Emacs (ESS) evaluate R code chunks within .rmd files and embed the outputs within the same file like R Studio?

Recently tried to start using (Doom) Emacs for writing R code via ESS mode. I was wondering if it's possible to embed the outputs of evaluated code chunks of R Markdown files like in R Studio Example: ...
1 vote
1 answer
92 views

Cannot set R :session in file property for interactive use

I would like all R src blocks in an org file to use the same session interactively and have included a minimal example below. I added the #+PROPERTY line as in the manual and ran C-c C-c as suggested ...
1 vote
1 answer
113 views

ESS: Turn off [TRUNCATED] in ESS R session

I'm running some code in a .Rmd file using M-n v u, but when I do so, my output is truncated. I'd like to turn this feature off, but the only documentation I can find mentioning truncation is for ess-...
0 votes
2 answers
242 views

Help getting two R plots into a Beamer slide

I am trying to develop slides for a course I am teaching in Org mode compiling to a latex beamer presentation. Overall most things are working fine. But for some reason I am having trouble getting two ...
1 vote
1 answer
96 views

Emacs + ESS with Anaconda in cluster?

i want to run a different version of R when I start ESS (Emacs Speaks Statistics). It is on a grid environment and using anaconda, so I would like it to run the following scripts. conda activate myenv ...
5 votes
1 answer
230 views

How to implement the native |> pipe in ESS mode

Using the code provided here I can use the magrittr package pipe %>%. I want to switch to the new native R pipe |>, but if I just substitute the old pipe with the new one the code is not ...
1 vote
0 answers
88 views

Enabling helm interferes with R/ESS

I have helm enabled in an Org file that init.el calls. The code looks like the following: (use-package helm :config (require 'helm-config)) (global-set-key (kbd "M-x") #'helm-M-x) (...
6 votes
1 answer
342 views

Using org-table data for R block

I'd like to be able to plot in an orgbabel chunk these data I have in a org-table: #+NAME:amount | date | amount |------------------+--------| | <2022-01-30 Sun> | 55.1 | | <...
0 votes
0 answers
306 views

org-babel code block wrong type argument

I'm stumped as to why I can no longer export an org-babel file with R code chunks and can not work out where the error is cropping up. A simple example that doesn't include the graph... #+STARTUP: ...
5 votes
2 answers
827 views

New frame does not respect default font

I use Emacs mostly to write R using ESS. I like a large font to reduce eye strain so the last line of my .emacs file is: (set-default-font "Inconsolata-20") If I open a file of R code, this appears ...
0 votes
1 answer
544 views

Getting R to Display Graphs in Emacs Window

There are some old threads asking about getting R to display its graphics in an emacs window (e.g. ESS plot directly to an Emacs buffer?) and the ESS manual says, 11.6.2 Using ESS with windowing ...
1 vote
0 answers
44 views

Setting R's `source()` options used by ESS

I'm trying to figure out what to add to my .emacs settings file to get ESS to include an option and setting when sending highlighted code to R. Specifically, I want to set source(max.deparse.length=...
1 vote
1 answer
34 views

ESS : Seeing vignettes for a package without attaching the corresponding package

Suppose I wish to see the vignettes for an R package via ESS. I can do it like this:- # This in the R process library(car) # This in the minibuffer M-x ess-display-vignettes My question is this: Can ...
1 vote
1 answer
110 views

Pass a table's colnames to an R block

I have an org file with this content: #+name: my-table | *Type* | *Value* | |---------+---------| | Web | 744 | | Checks | 520 | | Cash | 105 | |---------+---------| | *Total* | ...
1 vote
1 answer
49 views

Poly-Markdown+R does not find the right version of R for R code chunks

I am working on a Rmarkdown document and I have R 4.0.4 running in a buffer. I try to export the document with M-n e and it finds R 3.6.3 sessionInfo() R version 3.6.3 This meant that I had a lot of ...
0 votes
1 answer
384 views

Automatically change encoding of process buffers

Platform Windows 10 with GNU Emacs 26.1 (build 1, x86_64-w64-mingw32). Goal To set the encoding of process buffers to UTF-8. I would like to set the input and output encoding of process buffers, like ...
3 votes
1 answer
512 views

Convert orgmode to Rmd

As the title says, I have an orgmode file I have been using with ess and exporting to TeX which has been going very well. However, I need to now export to html for reasons out of my control, and was ...
1 vote
2 answers
3k views

ESS R error: searching for program

I have installed emacs on windows 10 working ok so far. Installed R and ESS. Set system and user path to Rterm.exe as read in some forums. Restarted and opened a R file in emacs. Syntax coloring is ...
1 vote
0 answers
298 views

How to use Emacs+ESS to access GNU R within docker including x11 without openssh-server

I'm using Debian Stable (currently Buster) to do my programming in GNU R. As an IDE I'm using both Nvim-R (a vim/neovim-plugin) as well as Emacs+ESS but not Rstudio (although it's a great IDE for ...
0 votes
1 answer
371 views

Clear console output on *R* buffers when using ESS

I have this kbd in my init.el (global-set-key (kbd "C-l") 'comint-clear-buffer) When I use Emacs-ess mode fro programming in R, I use this kbd to clear the R output buffer, this is usually ...
1 vote
2 answers
491 views

How to jump to R source code with ESS?

Q: how can I get to the source code of R packages using ESS? When I'm working with elisp, I can access the source code for any package easily with find-library or by following the links in find-...
1 vote
2 answers
408 views

Set ESS working directory from header-args with org-babel sessions

I am experiencing a very strange behavior with org-babel code blocks. When I operate without the :session tag, I am free to use :dir to set my working directory. As you can see, the following code ...
10 votes
2 answers
1k views

How to find what causes ESS to run very slow?

When working with an iESS session of R and an R file open side-by-side, I noticed extremely slow performance when typing indetifiers. Typing braces and operators is fine, however, when an identifier ...
1 vote
1 answer
139 views

Tell ESS to use a different R program when on a Tramp remote session

I'm trying to configure ESS to use a different R program path when I'm on a remote session. Now, every time I ssh into the hpc cluster I use, I set the variable inferior-ess-R-program to /weird/path/...
0 votes
0 answers
33 views

how to get out of a (R) repl’s multi-line (multiple-line) / line-continuation mode

My question: In (an R-repl from ESS layer) in spacemacs, I can’t end a multiple-line after I start it myDf %>% # here i hit RET so then the REPL goes into multi line mode: + myDf %>% myDf %&...
1 vote
1 answer
290 views

How to add function call highlighting in ESS?

I currently have some syntax highlighting in my ESS code (e.g., for brackets, =, and strings). I would like to add highlighting of function calls, like RStudio's "Highlight R function calls" ...
2 votes
1 answer
52 views

exporting table from R

I'm trying to export a table from an R code block and have read Results of Evaluation (The Org Manual) which states that tables can be output with header options of :exports results :results value ...
1 vote
1 answer
466 views

ESS start process does not include new R version

I am using the windows version of emacs that includes AuTeX and ESS from Vincent Goulet. I was using an older version of this packaging with a couple different versions of R. I recently installed the ...
1 vote
1 answer
276 views

ESS ignores R_LIBS_USER environment variable

I have the following in my .bashrc export R_LIBS_USER="/home/wdkrnls/R/lib/3.2" When I start R from the shell I see (even in Emacs M-x shell): .libPaths() [1] "/home/wdkrnls/R/lib/3.2" "/usr/lib/R/...
8 votes
1 answer
590 views

Can we get inline results with polymode for Rmd files?

As a new Emacs user, I've recently learned how to use polymode to handle R code in org-mode. I'm happy with it, since I get the same features than those implemented for example in Rstudio for Rmd ...
0 votes
0 answers
100 views

No match for ess-rdired

I'm not able to invoke the rdired-buffer when typing M-x ess-rdired, I get a "no match"-message. I'm also not able to find the function ess-rdired in the documentation (via C-h f). Any idea ...
1 vote
1 answer
54 views

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

I'm moving my R setup over to emacs and ess -- and am struggling with the emacs / LISP customisation process. In an answer to another question, I learnt how to create a function that concats a ...
2 votes
1 answer
121 views

emacs ess apply function to token under point

I've finally committed to moving over to both emacs and ess -- and i'm having a bit of trouble getting (the famously customisable) combination to work as i'd like. Say that i have a file that ...
0 votes
0 answers
197 views

Evaluate org-babel header arguments consistently

Consider the following org-babel code block: #+BEGIN_SRC R :session *R* :dir ~/_test getwd() #+END_SRC When I C-c C-c on my source block, I get the following result, as expected: #+RESULTS: : /...