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
0answers
18 views

No filename completion with Eglot and R

Using ESS with emacs I have automatic filename completion. So, when I am withing "./" and hit TAB, it shows me a list of files and directories within that directory. However, after installing eglot ...
0
votes
1answer
48 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 ...
5
votes
1answer
186 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 ...
0
votes
1answer
61 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 ...
3
votes
1answer
66 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 ...
0
votes
2answers
73 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 ...
1
vote
0answers
68 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
0answers
37 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 ...
3
votes
1answer
118 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: --------...
0
votes
0answers
28 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 ...
1
vote
1answer
47 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 ...
0
votes
0answers
29 views

Is it possible to export R code within Latex code in an org-mode document?

I am trying to evaluate R code within LaTeX code in an org-mode document. The objective is to export the org-mode document to a .tex document and, ultimately, to a nice pdf document. My problem is ...
0
votes
0answers
32 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 = ...
1
vote
1answer
45 views

How to create shortcut that will kill process for buffer with fixed name

I have code like this to run R command from Emacs: (defun call-r-command (command-list) "run R command in shell buffer window if there is displayed buffer that have shell it will use that window"...
1
vote
0answers
33 views

Setting up Knittr workflow in Emacs [duplicate]

I was a happy ESS and R user to obtain tex and pdf files from Rnw file with sweave and knitr. I have followed the answer given here, everything worked fine but after several updates or maybe new ...
1
vote
1answer
57 views

emacs opens ESS/R buffer in random window

I'm using emacs 26.1 with ESS. Whenever I open a R session with M-x R it opens in a random window. However, I would like it to open in the currently selected window. It seems to be a similar issue as ...
1
vote
0answers
125 views

Missing RMarkdown templates with poly-R

I use the ess, polymode, and poly-R packages together to work with RMarkdown files. I have also installed the R packages rmarkdown and tufte in my R library. While these R packages provide ".Rmd" ...
1
vote
0answers
45 views

R in ESS outputs UTF-8, which emacs renders raw

I find the question but no answer at Emacs ESS R - Message Content Encoding and Display Issue. In buffer *R*, the R process uses UTF-8 encoding for its output. However emacs does not decode that ...
0
votes
0answers
28 views

Rmarkdown-like export of Leaflet for R webmap to html from org-mode

With RMarkdown it's easy to embed an interactive webmap. E.g.: --- title: Some title output: rmarkdown::html_document --- ```{r} library(leaflet) leaflet(width = "100%", height = "650px") %>%...
2
votes
0answers
31 views

gnu screen emacs ess: M-X R freeze

I just pick up emacs after a while with Vim. This is run on CentOS server. I ssh to the server, and start with gnu screen, and emacs ess, when I start to run R, emacs just freeze. Here is what I ...
3
votes
0answers
176 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
1answer
40 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 ...
0
votes
1answer
628 views

org-babel-execute-src-block: No org-babel-execute function for R!

In org-mode, attempting to execute the following block... #+BEGIN_SRC R 1+2 #+END_SRC ...gives the error message org-babel-execute-src-block: No org-babel-execute function for R!. I have followed ...
1
vote
1answer
33 views

Org babel R: why is 'NA' replaced with 'nil'

When using R in org mode source blocks, any NA (i.e. missing) values in tables get replaced with nil. Why is this? And is there a way to change this (globally, or at the file level)? I regularly ...
1
vote
1answer
168 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
1answer
161 views

Tramp and X11 forwarding when changing user (su)

I can connect to a remote server with Tramp C-x C-f /ssh:group@remotehost: and get a plot output window (with ess R). But if I change user C-x C-f /ssh:group@remote|su:user@remote: there's no X11 ...
1
vote
0answers
112 views

R (ESS) freezes emacs when asking for project directory

Using Windows. Fresh install of emacs 2.6. The installation of R CLI and R studio worked ok. No issues. I open R files on emacs and ESS mode is properly set on modeline but when I try to execute/eval ...
0
votes
1answer
830 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
1answer
109 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 ...
1
vote
0answers
33 views

ESS folding for R6 classes

What is the proper way to install, configure and activate folding of R script files? I followed emacswiki.org/emacs/FoldingMode but it doesn't seems to work. I installed folding.el to .emacs/lisp/. ...
1
vote
0answers
65 views

Save org-babel output with org-attach

I am using org-babel to write R code in Emacs org-mode. Here's an example: #+BEGIN_SRC R :session *R* :results output graphics :width 5 :height 5 data(AirPassengers) AP <- AirPassengers plot(AP) ...
0
votes
1answer
92 views

Printing tibbles in iESS with many columns extremely slow

When I print large tibbles from R it takes a very long time and the iESS buffer runs extremely slowly thereafter (huge lag moving the cursor throughout the buffer or typing). The code below takes 5 ...
2
votes
1answer
178 views

ess-mode library name auto-complete

I've been looking around for a solution to get company-mode to auto-complete R library names in ess-mode. The R libraries are stored in folders with the same name, wouldn't it be just the case of ...
1
vote
1answer
362 views

Pass variable from src block to org-edit-src-code

I have a table in org-mode that I want to pass into an R source block and then plot from it. When I write everything in org-mode and execute it, I get the results that I expect. However, when I enter ...
3
votes
1answer
119 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?
6
votes
3answers
506 views

Using constants inline

How to do the following in org-mode: define a constant in the beginning of file, and than use it in the text or even compute on it. Following methods didn't work for me: Method 1: #+CONSTANTS: t=...
4
votes
1answer
2k 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 <...
1
vote
1answer
324 views

ess R startup warning locale

I am using Emacs 25.1.1 with spacemacs. Everytime I run iESS, I get the warning about locale as, During startup - Warning messages: 1: Setting LC_CTYPE failed, using "C" 2: Setting LC_COLLATE failed,...
1
vote
0answers
177 views

Get company completion without evaluation in ess

Is it possible to do completion without evaluating the buffer in ess-mode/R-mode which uses company-R-objects and company-R-args as backends ? Backends like company-jedi can do completion without ...
4
votes
1answer
87 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
371 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 ...
2
votes
2answers
267 views

Changing HTML Table Formatting When Exporting from R

I am generating several tables in R and then exporting them to HTML(5). For instance: #+BEGIN_SRC R :session *R-org* :results output raw :exports results df <- data.frame(x=0.110, y=0.132) ...
0
votes
1answer
102 views

How Do you export only R code from Rnw file

I am working with knitr, polymode, ess and I would like to export just the R code from my .Rnw into a .R file. A basic file might look something like this: \documentclass[a4paper]{article} My Rnw ...
3
votes
0answers
318 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 ...
0
votes
1answer
328 views

Org babel caching for R when using session

I have an file which is a research paper (here); it contains numerous R blocks which produce tables and figures. Since these share common data and preliminary calculations, they are run as a org-babel ...
0
votes
2answers
64 views

How to avoid redundant output from inline orgbabel code?

When using #Begin_Src R blocks one can change the code in blocks and then rerun all the code blocks in a document. Great. However, if one does this with inline src, such as, src_R[:session *...
2
votes
2answers
994 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 * ...
3
votes
1answer
2k 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: ...
2
votes
1answer
167 views

Why does inserting a new R chunk inside `ess-noweb-mode` give me a leading @ symbol?

I am writing a statistical report using .Rnw buffer and enjoying the very nice ess-noweb-mode, which I see very promising indeed, but what struck me is the strange behavior when I hit the keybinding ...
2
votes
1answer
3k views

Exporting code blocks to pdf via LaTeX

I am writing a report in org mode and would like to show some code blocks as seen in so many tutorials. Here is some official documentation, however it was written for org-mode 6.xx back in 2011. I ...