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.

See http://www.r-project.org for more details on R. More information on ESS can be found at its tag: .

102 questions
35
votes
3 answers

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 course, choose other graphical devices, which is…
Dan
  • 32,584
  • 6
  • 98
  • 168
21
votes
2 answers

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+R code in Knitr way; at right buffer PDF output…
drobnbobn
  • 575
  • 4
  • 15
10
votes
2 answers

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 is typed, there is very significant input lag…
Kristóf Marussy
  • 606
  • 4
  • 10
10
votes
3 answers

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=10 The temperature is `$t`, and twice of that is…
Shambho
  • 457
  • 3
  • 13
8
votes
1 answer

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 files (e.g., facilities to execute code chunks and…
Philopolis
  • 1,094
  • 8
  • 14
8
votes
1 answer

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 <- x + rnorm(100) xtable(summary(lm(y ~ x))) #+end_src I…
Shambho
  • 457
  • 3
  • 13
7
votes
1 answer

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 you call it), and I can't continue editing, using…
7
votes
1 answer

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 have tried all variations that I have found on my…
n1k31t4
  • 669
  • 8
  • 18
6
votes
1 answer

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 or overview of the R script file based on…
doctorate
  • 1,789
  • 16
  • 39
6
votes
1 answer

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 immediately upon startup and I have to force quit…
6
votes
3 answers

Display org-mode src R results horizontally

Is there a way to show the results of a Source Block horizontally, or equivalently to transpose an org-table? For example, I have the following: #+begin_src R :results table c('a','b','c') #+end_src #+RESULTS: | a | | b | | c | I have discovered I…
Gilly
  • 211
  • 1
  • 5
5
votes
1 answer

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 | | <2022-01-31 Mon> | 54.7 | | <2022-02-01 Tue> | 54.5 | |…
5
votes
1 answer

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 (say, in R-mode)? As an example, I'd expect…
Dan
  • 32,584
  • 6
  • 98
  • 168
5
votes
1 answer

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 to that session send the whole script to be…
pglpm
  • 265
  • 1
  • 10
5
votes
1 answer

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: ----------------------------- | ESS[R] | *R* …
Philopolis
  • 1,094
  • 8
  • 14
1
2 3 4 5 6 7