Skip to main content

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
40 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 ...
Riccardo's user avatar
  • 133
0 votes
1 answer
27 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(...
Tiberius's user avatar
  • 113
1 vote
1 answer
41 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 ...
r2evans's user avatar
  • 275
0 votes
1 answer
59 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 ...
Lindsay's user avatar
  • 37
1 vote
2 answers
108 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]&...
pglpm's user avatar
  • 325
2 votes
1 answer
24 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 ...
jerome's user avatar
  • 213
0 votes
2 answers
112 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 ...
Stuart's user avatar
  • 101
2 votes
2 answers
71 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 ...
cdd's user avatar
  • 217
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 ...
swhalemwo's user avatar
1 vote
0 answers
104 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: ...
arstdhneio's user avatar
0 votes
1 answer
65 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 ...
Alessandro's user avatar
0 votes
0 answers
124 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, ...
nonreligious's user avatar
1 vote
1 answer
308 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 ...
cdd's user avatar
  • 217
2 votes
2 answers
388 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 ...
henning no longer feeds AI's user avatar
1 vote
1 answer
96 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 ...
ejneer's user avatar
  • 13
0 votes
2 answers
251 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 ...
jds's user avatar
  • 177
1 vote
1 answer
100 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 ...
Jorge Guzman's user avatar
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) (...
cdd's user avatar
  • 217
6 votes
1 answer
352 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 | | <...
Emmanuel Goldstein's user avatar
0 votes
0 answers
310 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: ...
slackline's user avatar
  • 345
0 votes
1 answer
561 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 ...
mikemtnbikes's user avatar
1 vote
0 answers
46 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=...
mikemtnbikes's user avatar
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 ...
user2338823's user avatar
1 vote
1 answer
117 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-...
mikemtnbikes's user avatar
5 votes
1 answer
232 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 ...
Claudio's user avatar
  • 171
0 votes
1 answer
404 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 ...
henning no longer feeds AI's user avatar
1 vote
0 answers
303 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 ...
n0542344's user avatar
  • 185
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 ...
user7543513's user avatar
1 vote
1 answer
113 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* | ...
Damien Cassou's user avatar
0 votes
1 answer
381 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 ...
PinkCollins's user avatar
3 votes
1 answer
513 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 ...
HaoZeke's user avatar
  • 145
1 vote
1 answer
140 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/...
apprentice's user avatar
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 %&...
ppp's user avatar
  • 25
1 vote
1 answer
291 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" ...
shir's user avatar
  • 51
2 votes
1 answer
59 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 ...
slackline's user avatar
  • 345
1 vote
1 answer
470 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 ...
user3653085's user avatar
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 ...
harisf's user avatar
  • 101
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 ...
ricardo's user avatar
  • 147
2 votes
1 answer
122 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 ...
ricardo's user avatar
  • 147
1 vote
0 answers
229 views

ESS R workflow with package management in renv (or Packrat)

I do all my R development in Emacs via org-mode and ESS. All of my R projects are managed out of a single org-mode document (studies.org). Each project has a header and is tangled to its own project ...
Adam's user avatar
  • 1,907
1 vote
2 answers
412 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 ...
Adam's user avatar
  • 1,907
0 votes
0 answers
201 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: : /...
Adam's user avatar
  • 1,907
5 votes
1 answer
750 views

Any equivalent of R+ESS for python?

I do a lot of R coding on Emacs – on Windows – using the wonderful ESS package. What I particularly like is that I can: start an R session, and then send lines or regions of the script I'm working on ...
pglpm's user avatar
  • 325
0 votes
1 answer
613 views

Draw pie chart from orgmode table

I'm trying to draw a pie chart from an orgmode table. Let's keep it as simple as possible. #+TBLNAME:kuchen | 100 | ABC | | 3 | DEF | | 123 | XYZ | #+name: pie-chart (kuchen = kuchen) #+begin_src ...
Keks Dose's user avatar
  • 518
7 votes
1 answer
541 views

Emacs busy while evaluating R in ESS

When using Emacs with ESS, when I evaluate functions that take longer to complete (reading in larger files or executing SQL queries), the whole Emacs becomes busy (freezes, hangs, crashes - whatever ...
Liudvikas Akelis's user avatar
0 votes
1 answer
423 views

Emacs 26.3 cannot call R

After updated to macOS Catalina (10.15) I've been trying to use R in Emacs 26.3. However, Emacs is not fetching R by using M-x R (Emacs says [No match]). I already checked the paths for both R and ...
Dylan's user avatar
  • 1
3 votes
1 answer
140 views

Run R code on selected object

I am missing (or not aware) of a feature in ESS to run some R code on selected text. When editing a script, like df1 <- data.frame(a=1:100,b=rnorm(100)) I often want to see head(df1) in my ...
John Doe's user avatar
0 votes
2 answers
351 views

underscore ("_") randomly stops working for ESS

I am using iESS console and editor (ESS) for R programming, and often times (and randomly) the _ stops resulting in <-. To temporarily hack it, I found that I could use ess-toggle-underscore or ...
Pandian Le's user avatar
8 votes
1 answer
592 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 ...
Philopolis's user avatar
  • 1,134
1 vote
0 answers
170 views

How to specify a pdf viewer for ess mode

I have set the variable ess-pdf-viewer-pref to "evince" But when I export any Rnw file using M-n e, instead of displaying the pdf in evince it is displayed inside Emacs. How can I stop Emacs ...
Pooya's user avatar
  • 113