Questions tagged [ess]
ESS (Emacs Speaks Statistics) is an emacs add-on for editing scripts and interacting with statistical programs such as R, Stata or SAS.
178
questions
0
votes
0
answers
20
views
How to use connection-local-set-profiles to set inferior-ess-r-program when on using ESS over TRAMP?
This is a similar question to this other that remains unanswered.
I am doing some work in the R language with the ess package on emacs on a remote computer to which I connect via tramp/ssh. The remote ...
1
vote
1
answer
12
views
ESS with R sessions in different frames
When I have two frames open with different R sessions in each, such as
+------------+------------+ +------------------+
| # file.R | | | |
| 1+4 | ...
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 ...
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 ...
0
votes
0
answers
17
views
Problem with ESS when running R: .load.ESSR and .ess.eval errors
I have installed ESS on emacs v27.1. When I enter M-x R , R launches but I get the error message:
load ESSR: Error in load.ESSR("~/.emacs.d/elpa/ess-20230404.912/etc/ESSR/R"): could not find ...
0
votes
1
answer
73
views
How to stop a process gracefully before killing its buffer?
I want to make a function that stops the ESS inferior process (e.g. an R or Julia shell), kills its buffer and deletes its window. ess-inf.el provides the function ess-quit to exit the inferior ...
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:
...
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 ...
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 ...
1
vote
1
answer
132
views
EMACS encoding issues Windows 11
I am having encoding issues with EMACS (ESS). Part of the problem is that many of my file paths contain a special character (ý). These characters keep getting converted to "ý" when I close ...
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 ...
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 ...
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 ...
0
votes
0
answers
22
views
File-local variable, stop emacs from asking for ess-starting-directory
I am trying to get ESS to stop asking for "R starting project directory".
I have seen this post: How to stop ESS from asking for "R starting project directory"?, but it does not ...
3
votes
1
answer
100
views
ess - starting directory
I use ess to run R and have encountered an annoying change that now when I start an R process with ess it defaults to starting in what is apparently the root of the project not the directory of the ...
0
votes
0
answers
49
views
ess font-lock-add-keywords not working
For several years I have been using this bit of code in my init.el file to organize comments. Here is the code
`
(defgroup ess-jb-faces nil
"Faces used by cutomized ess-mode"
:group '...
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
...
0
votes
1
answer
52
views
How to run initialization commands with tramp?
I would like to run some commands on remote host before giving control to tramp.
E.g., I would like to load easybuild modules to make sure that environment variables are set correctly for ESS.
My ...
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)
(...
3
votes
2
answers
148
views
up-to-date method for disabling smart underscore in ESS?
I've read the answers in Disable smart underscore for good ESS and ESS smart underscore does not work in emacs25 reasonably carefully and don't seem to be getting any of them to work. Maybe that's ...
1
vote
1
answer
115
views
Org-babel and ESS: Problem with exporting ANSI code to pdf
I am having some issues with Org mode Babel exporting output with ANSI characters.
When I don't specify a session (example 1), everything is OK.
When I specify a specific session, the code is garbled (...
1
vote
0
answers
32
views
ess-eval-line-visibly-and-step splits window and shows in both
I've noticed that when I execute ess-eval-line-visibly-and-step inside an R-mode buffer and I don't already have an active R session, it will split the screen (good), however it will change both sides ...
0
votes
1
answer
360
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
1
answer
50
views
How to update beg end with comment-region
Scenario: I have Emacs open with split window. Top window contains an R script. Bottom windows has the interactive R session. I want to be able to copy a region from the interactive window to the ...
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=...
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 ...
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-...
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 ...
2
votes
1
answer
402
views
How to stop ESS from asking for "R starting project directory"?
Every time I execute all code blocks in an org mode file that contains an R code block (using org-babel-execute-buffer with C-c C-v C-b), ESS pauses to ask for R starting project directory, which ...
1
vote
1
answer
115
views
Help window in ESS
I am using ESS for using R. When I use help in ESS, I have the screenshot like Picture 1. But, I want to get Picture 2. How do I manage my init.el? The following code is my init related to ESS.
(use-...
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 ...
0
votes
1
answer
81
views
ESS: start R in current directory conflicts with ivy-mode
I use ivy-mode for completion. I don't usually want to see the dot files ("./" and "../") when selecting files/directories, so I've set (setq ivy-extra-directories nil). I also ...
2
votes
2
answers
311
views
Key binding for pipe in ESS
I am trying to define keymapping about %>% for ess R mode.
Code 1 is my init.el based on How to implement the piping operator %>% in ESS mode?. After evaluation of the code, I get the key ...
1
vote
0
answers
28
views
add personal template directory to poly-R
I'm trying to migrate my R workflow totally to emacs (my experience with emacs is very basic), so I installed ESS and poly-markdown and poly-R among other things.
When working in rmarkdown files I ...
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 ...
1
vote
1
answer
32
views
ess: transform a text selection into an R vector
Is there any ess function that does the following? Assume you have the line in Emacs like this
1 2 3 4
then once selected (e.g., using the mouse), it is transformed into
c(1,2,3,4)
It would be a ...
1
vote
1
answer
139
views
How to turn off R help document popup when using ESS?
When I input a function, the R help document pops up automatically. It's very annoying. How to turn it off?
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* | ...
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 ...
2
votes
0
answers
182
views
Polymode very slow in Rmd files
I am struggling with emacs constantly hanging as soon as I move the cursor into a code chunk in Rmd files. It spends about two seconds moving the cursor after I hit an arrow key. Can you help me get ...
0
votes
1
answer
185
views
How to build and install R package in ESS?
Some time ago I've written function to build R package using "CMD INSTALL" the problem is that I can't do the same with ESS. There is function ess-r-devtools-build but it seems that it don't ...
1
vote
1
answer
79
views
Only run a function if it is a new session
In my init.el file, I have a hook to setup my workspace when I open a particular type file. Specifically, when I open an R file (i.e., *.R) and ESS-mode starts, a couple of other windows open with ...
3
votes
0
answers
92
views
Why is file buffer replaced by scratch buffer on startup?
When I open an R file in ESS-mode, I'd like emacs to setup my panes in a certain format.
To this end, I've added the following to my init.el.
(add-hook 'ess-mode-hook
(lambda()
(...
0
votes
0
answers
35
views
Patching together emacs buffers and shells outside of emacs
I'd like to use emacs as a replacement for my current IDE when using R. I like to divide my workspace into three panes:
Text editor
R console
zsh
Previously, I had used tmux to achieve this by ...
1
vote
2
answers
90
views
Prevent ESS from opening an R console
Say I want to create and edit a new R file using emacs/ESS. I type emacs myfile.R at my shell prompt and an empty file opens. Hurray! I start typing my code:
library(da
at which point I am interrupted ...
0
votes
1
answer
731
views
spacemacs: How can I disable flymake and flycheck completely, to speed up performance
I’m using spacemacs. I just installed syntax-highlighting layer and auto-completion layer, and now my emacs got really really slow.
So slow that going back to PyCharm (IntelliJ) with R-plugin feels ...
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/...
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 %&...
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" ...
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 ...