emacs-ESS run multiple lines of R code with one keystroke

239 Views Asked by At

Suppose I want to create this bar-plot in R:

barplot(table(mtcars$gear),
        xlab = "Sample x-label",
        ylab = "Sample y-label")

In Rstudio, I just need one keystroke (Ctrl+Enter) to generate this barplot. I can press Ctrl+Enter anywhere in lines 1, 2, 3 and it will generate this barplot.

In emacs-ESS, I have to press Ctrl+Enter three times to create the barplot (separately for the three different lines).

Is there a way to configure emacs-ESS so that just hitting Ctrl+Enter at the beginning will generate the plot?

0

There are 0 best solutions below