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.
146
questions
34
votes
2answers
3k 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 ...
19
votes
2answers
4k views
how to setup Knitr workflow in Emacs?
RStudio provides a one-button way for produce PDF file from LaTeX+R source with Knitr. It looks great for doing reproducible research. And I am trying to configure my Emacs for:
at left buffer LaTeX+...
13
votes
2answers
979 views
Can Emacs use tramp to run in an interactive session on a remote HPC node?
I have been using Emacs with ESS and tramp to load remote files and run remote R processes on HPC computers. With ssh keys, tramp makes this easy with C-x C-f to find file at /ssh:myserver:/path/to/...
10
votes
2answers
705 views
Technical considerations for package maintainers to not use the Emacs package manager?
I am noticing some notable package maintainers are choosing to not use the Emacs package management system (ESS?) or complaining about its limitations (Helm).
Quoting from Helm's README.md:
...
10
votes
1answer
1k views
Insert code chunk in R Markdown with yasnippet and polymode
I am trying to write a yasnippet to insert code chunks into an R Markdown file. I use polymode to have multiple major modes (markdown, ESS[S]) in a single file. This is my snippet:
# -*- mode: ...
9
votes
1answer
1k views
How to implement the piping operator %>% in ESS mode?
Recently, R witnessed the smart introduction of the piping operator %>% or then operator in code which I use quite frequently nowadays. I wonder if this has already been implemented in the newest ...
9
votes
2answers
918 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 ...
7
votes
1answer
313 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 ...
6
votes
1answer
3k 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 <...
6
votes
1answer
598 views
How to implement comments outline in ESS similar to that of Rstudio?
Shifting from Rstudio to ESS took some time with me because of the steep learning curve of a versatile Emacs editor, but is was a worthwhile experience. What I am still missing in ESS is that outline ...
6
votes
2answers
2k views
Disable smart underscore for good ESS
I am trying to disable the underscore thing in ESS where it gets converted to a <- . If I add
(add-hook 'ess-mode-hook
(lambda ()
(ess-toggle-underscore nil)))
To my init file, it works ...
6
votes
1answer
649 views
What is the difference between the knitR and knitR-ESS for polymode?
I have recently setup polymode for use with Rnw and Rmd files.
When it came to knit/weave a document I was given the choice of four defaults;
knitR-ESS, Sweave, knitR and Sweave-ESS.
I usually use ...
5
votes
3answers
106 views
Sending `C-c C-c` to the process window without swithcing to it
In ESS mode, I sometimes send some code to the process buffer and want to cancel it using C-c C-c. Can I do this without actually switching to the process window from the script window?
5
votes
1answer
637 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 ...
5
votes
1answer
468 views
ESS indentation of parentheses after =?
Indentation in ESS is occasionally a little kooky, and I'm trying to figure out if the kookiness is a bug or a feature. How does one get proper indentation of parentheses after an "=" sign in ESS (...
5
votes
1answer
144 views
Send content of region or current line to a tmp file, then execute shell script with filename as argument
I am transitioning to Emacs with evil-mode after years of Vim. For work reasons I have to use a GUI statistics program (Stata) frequently. This program does not integrate well with external editors. ...
5
votes
1answer
499 views
Why is ESS causing my emacs to start so slowly?
For some reason (which I can't understand, I did not change anything) emacs has become very slow - as in 2 min - at startup. I traced it down to the require commands of ESS. This is what I have in the ...
5
votes
1answer
412 views
ESS freezes on startup with ess-tracebug mode enabled
I am currently running R 3.3.1 in emacs 25.1.1, ESS 16.10, and polymode 20160805.448 installed via MELPA on Mac OS Sierra. Whenever I try to open an interactive R console using M-x R, it freezes ...
5
votes
0answers
82 views
Return System Notification When Long-running Comint Process Completes?
I often have long-running processes in comint shells (e.g. SQL or fitting statistical models, both usually via an R/ESS shell).
While they're running I navigate away and do something in another ...
4
votes
2answers
756 views
Unable to install ESS package
I want to install ESS. I initialised the package manager with
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/"))
(package-...
4
votes
1answer
3k views
graphing R in org-babel
How can I get a graph back in my org-babel results for R code?
#+BEGIN_SRC R :results output latex
boxplot(islands)
#+END_SRC
Islands is a baked in dataset for R.
Do you do it with
#+resname:
...
4
votes
1answer
98 views
ESS: getting help on package
Is it possible to get ESS to display results of help(package=xxx) in a new buffer, like it does for ?xxx?
4
votes
1answer
109 views
ESS: Disable spaces around `=` in function arguments
With ESS + auto-complete, I get AC suggestions for function arguments that allow me to save time typing them out. What irks me is that it completes the function arguments with spaces around them. For ...
4
votes
1answer
356 views
setting inferior-R-args variable in init.el has no effect
I am trying to set a variable for ESS. This is how I load ESS:
;; ess / try to not (require 'ess-site) as it slows down start-up
(autoload 'R-mode "ess-site.el" "Major mode for editing R source." t)
...
4
votes
1answer
70 views
How to copy output from ess to the kill ring?
Q: how can I automatically copy output from ess to the kill ring?
Background
I use ess to conduct statistical analysis. On occasion, I need to copy its raw output into another buffer (usually ...
4
votes
2answers
519 views
Flycheck r-lintr doesn't find anything
I want to use lintr to check R-files in emacs.
According to https://github.com/jimhester/lintr#emacs
lintr is fully integrated into flycheck when using ESS. See the installalation documentation ...
4
votes
1answer
304 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 ...
4
votes
1answer
270 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:
--------...
4
votes
1answer
1k views
How to increase C stack size for R in ESS?
I can not figure out how to change the C stack size for R in ESS. I can change it in terminal as follows:
X:~$ ulimit -s
8192
X:~$ R --slave -e 'Cstack_info()["size"]'
size
7969177
X:~$ ulimit -...
4
votes
0answers
104 views
using global-linum-mode with ess with a latex/R knit file
When using global-linum-mode with a latex file that has blocks of R code (*.rnw file) moving in and out of the R code blocks cause the line numbers to disappear until the cursor is moved again. Is ...
3
votes
2answers
4k views
Install ESS with use-package
I would like to install the emacs speaks statistics package from melpa.
I found the following snipped
(use-package ess
:init (require 'ess-site))
on this side https://emacs.stackexchange.com/a/...
3
votes
1answer
594 views
Symbol's value as variable is void: polymode-mode-map
I define a function ess-rmarkdown to compile RMarkdown documents with polymode.
(use-package polymode
:ensure t
:config
(use-package poly-R)
(use-package poly-markdown)
;;; MARKDOWN
(add-...
3
votes
1answer
215 views
“Dissasociate” auto-mode for specific files (in ESS)
I'd like to keep ess as automatic major mode for R files and everything else, except for Julia, for which I want to use julia-mode alone. However, I cannot find out how to "unbind" the file ...
3
votes
1answer
169 views
How to control which iESS process gets a code evaluation?
I have several R instances running and want to pick which one gets the evaluations in my buffer. Is there a built-in way of doing this?
3
votes
1answer
92 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 ...
3
votes
1answer
518 views
Polymode appears in minibuffer but does not weave into a file on Windows, why?
This is a follow-up post to Polymode installation on Windows machine. Accordingly I installed polymode using this code in the init.el file after ESS code:
(require 'poly-R)
(require 'poly-markdown)...
3
votes
1answer
543 views
Polymode installation on Windows machine
Polymode is very promising to handle the integration of R chunks using different modes.
I went through the documentation and it works well when I am inside .Rmd file but not inside .Rnw. In the .Rnw I ...
3
votes
2answers
81 views
Using tramp and ESS-mode, how can I get the R interpreter to execute locally?
I use tramp to edit R files on a remote server. When I evaluate R code within ESS-mode, it starts an R interpreter on the remote machine. However, at the moment ssh -X to the server does not work, so ...
3
votes
1answer
212 views
How to get documentation link in ESS R?
In RStudio, the documentation pane display not just the help file but also links to other help files (see link to aov below).
How to get the same in ESS R?
3
votes
1answer
81 views
imenu in ess-mode: recognize assignment with “=”
Is there a way to configure the imenu integration in ESS-mode so that it recognizes assignment by the equal sign "=", not only by arrow "<-"?
I'm switching between R and python so I've switched to ...
3
votes
1answer
116 views
ESS indentation inside functions
Indentation for R inside functions seems to be broken for pipes and '+'s:
f <- function(something){
mutate(something, l="aaaa") %>%
select(l) %>%
str_replace("a", "A")...
3
votes
0answers
256 views
“error in process sentinel” whenever using %>% in an ESS R buffer
Whenever I include a pipe (%>%) in a ESS R buffer, I start getting the following error repeatedly, with lags that make editing almost impossible:
error in process sentinel: Not enough arguments ...
3
votes
0answers
393 views
set breakpoint while in debugger?
Is it possible to set a breakpoint on an arbitrary line while already established in browser()? As a use-case: if I debug(myfunc) and while in Browse[2]> ... I realize that I need to jump forward ...
2
votes
1answer
81 views
Is there a way to evaluate from top of buffer to point?
While doing statistical work in ESS, I often want to evaluate everything from the top of buffer to point. This is to make sure that my analysis is reproducible (i.e. script can be run from top to ...
2
votes
2answers
2k views
Reference a variable in a 2nd org-babel code block
How can I define vars in one org-babel code block and use them in a second? This closely follows the tutorial section block-to-block
variable passing linked in the first answer.
# file test.org
* ...
2
votes
2answers
685 views
default location to install ess not works with the self installed emacs
I am running Ubuntu 14.04. I don't use emacs from its repository.
I installed my emacs by compling from source, the default location is /usr/local. e.g. /usr/local/bin/emacsand /usr/local/share/...
2
votes
1answer
94 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 ...
2
votes
1answer
766 views
ESS poly-R issue
I am trying to setup ESS with polymode and poly-markdown
I have the following in my myinit.org file which becomes
compiled into init.el
;; https://polymode.github.io/installation/
(use-package ...
2
votes
1answer
125 views
ESS failed to run: ess-s-define-runners is void
After upgrading packages in emacs, I have the following error message when trying to run R (M-x R): Symbol's function definition is void: ess-s-define-runners.
I can't find where the error is. Here's ...
2
votes
1answer
124 views
Matching key-bindings between modes
I'm new to emacs, and I'm trying to set it up as my editor for both python and R. Elpy and Ess are both great, and I'm relying on them a lot. However, I'm used to the Ess key-bindings, and would like ...