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
1 answer
36 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
50 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
  • 195
1 vote
1 answer
29 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
68 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
0 answers
17 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
46 views

Polymode support for Reticulate-library for mixing R and Python

Polymode work well with Rmarkdown using ESS in R analyses. There is a R package reticulate that allows running python within R either interactively with reticulate::repl_python() or by line or file ...
jpf's user avatar
  • 11
0 votes
0 answers
64 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
0 votes
0 answers
27 views

tempel highlighting persists

I am using the tempel package and have the following snippet to insert R code blocks in Quarto: markdown-mode (rcode "```{r}" n p n"```") This works great for inserting code ...
cdd's user avatar
  • 195
0 votes
1 answer
178 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
  • 195
1 vote
2 answers
217 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's user avatar
  • 82
1 vote
1 answer
42 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
124 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
56 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
81 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
  • 195
5 votes
1 answer
248 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
225 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
  • 303
0 votes
1 answer
361 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
32 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
28 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
77 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
4 votes
1 answer
204 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
  • 151
0 votes
1 answer
277 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's user avatar
  • 82
1 vote
0 answers
241 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
47 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
77 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
307 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
421 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
107 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
30 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
247 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
34 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
  • 303
1 vote
1 answer
393 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
92 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
  • 1
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
111 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
205 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,857
1 vote
2 answers
336 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,857
0 votes
0 answers
160 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,857
5 votes
1 answer
652 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
  • 265
0 votes
1 answer
527 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
  • 508
7 votes
1 answer
500 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
381 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
133 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
328 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
551 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,094
1 vote
0 answers
152 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
5 votes
1 answer
516 views

How to display *help* buffers below one specific window?

I am (really) new in Emacs and ESS, and I am currently trying to customize my environment. The default settings of ESS[R] are convenient for me, since ESS[R] organizes the windows as follows: --------...
Philopolis's user avatar
  • 1,094
0 votes
0 answers
111 views

Projectile renaming buffer name causing issues with ESS (ctrl enter) functionality

I have recently installed projectile package into my Emacs. It's great package, however, now my C-RET binding to ESS (R) is not working any more. Part of my current init.el related to ESS looks like ...
Tomas's user avatar
  • 1
2 votes
1 answer
199 views

Polymode changes from ESS-mode to Markdown-mode whenever I press enter

When I am editing .Rmd file within a polymode chunk, the mode switches from ESS to Markdown mode whenever I press enter. However, it switches back to ess-mode whenver I save the file. I will try ...
riley.finn's user avatar
0 votes
0 answers
73 views

How to "manipulate" using R in Emacs

In Rstudio one can use library manipulate to interactively change the plot over some parameters(mu). When you use this in emacs ESS it gives error: function(mu){ plot(mu) } manipulate(myfunc(mu),mu = ...
Pandian Le's user avatar