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.

Emacs Speaks Statistics (ESS) is an add-on package for emacs text editors such as GNU Emacs and XEmacs. It is designed to support editing of scripts and interaction with various statistical analysis programs such as R, S-Plus, SAS, Stata and JAGS.

ESS is freely available under the GNU General Public License (GPL).

Resources:

280 questions
6
votes
0 answers

Emacs indentation behavior for R

I recently upgraded to the new Emacs ESS version 15.03-1 and it has changed how my R code is being indented. For example, setMethod('show','AClass',function(object) { ## do something.... indents after I hit Tab to have '##' 2 spaces…
user2623214
  • 133
  • 4
6
votes
2 answers

Refactoring R code using ESS/R

I would like to know if it is possible to refactor R code in ESS. Using search and replace in Emacs does not seem to be a good alternative to it.
ggg
  • 1,857
  • 2
  • 21
  • 33
6
votes
2 answers

ESS & Knitr/Sweave: How to source the Rnw file into an interactive session?

This is a terribly simple request, and I can't believe I haven't found the solution to this yet, but I've been searching for it far and wide without luck. I have an .Rnw file loaded up in Emacs, I use M-n s to compile it. Everything works well, and…
Aleksandar Dimitrov
  • 9,275
  • 3
  • 41
  • 48
6
votes
1 answer

How can I automate these emacs ESS (ess-remote) commands?

I'm using a local emacs instance (aquamacs) to run R processes on a remote server, and I'd like to automate the process of connecting to my server. The process is as follows: [in emacs] M-x shell [in the resulting console] TERM=xterm ssh -Y -C…
Solomon
  • 946
  • 14
  • 18
6
votes
4 answers

Is there an Emacs mode for Rscript?

Is there any usable emacs mode for Rscript? (Rscript is the script front-end for the R language.) If I type this: #!/usr/bin/Rscript print(commandArgs(TRUE)) and do indent in the ESS R-mode it indents the first line like crazy, since it sees it as…
Frank
  • 64,140
  • 93
  • 237
  • 324
6
votes
1 answer

Changing background color of inferior-ess-mode in Emacs

As I'm working a lot with Latex and Sweave/knitr, I wondered if there's a possibility to change the background color of different modes in Emacs, e.g. change the background color of inferior-ess-mode (R) or ess-mode (R-Scripts) to black. At first,…
beginneR
  • 3,207
  • 5
  • 30
  • 52
6
votes
3 answers

How to specify the package when looking up a help reference page for a function?

How does one look up the help manual page for a function and specify the package in R? For example, count appears in both seqinr and plyr. If I want to look up count in plyr, what's the command? I've tried a few obvious (but wrong) guesses such as…
daj
  • 6,962
  • 9
  • 45
  • 79
5
votes
1 answer

R: debugging code from emacs using ess-tracebug?

I want to use interactive debugging of R code in emacs, and found about ess-tracebug, but can't get it to work. I did the following: Installed ess-tracebug Started execution of an R script with ESS C-c C-n Set up a breakpoint, now if I try to do…
719016
  • 9,922
  • 20
  • 85
  • 158
5
votes
2 answers

Emacs+ESS+R: How to have help page open in new buffer

Currently I have set options(help_type="text") and getOption("help_type") returns "text". Not sure why but R still opens a new browser window or tab when I type ?par in the inferior ESS (iESS) buffer. If I explicitly evaluate…
hatmatrix
  • 42,883
  • 45
  • 137
  • 231
5
votes
1 answer

emacs ess-indent-or-complete sends newline to R process

Occasionally, for reasons I can not determine, ess-indent-or-complete sends an input to the R console. In other words, I will be typing something, hit tab to autocomplete (or company autocompletes for me), and the R process will update with a…
C-x C-c
  • 1,261
  • 8
  • 20
5
votes
3 answers

How can I get Emacs ess to recognize a query string (within quotes) as code?

Background I have a function dbquery that simplifies the process of querying a MySQL database from within R. dbquery <- function(querystring) { dvr <- dbDriver("MySQL") con <- dbConnect(dvr, group = "databasename") q <- dbSendQuery(con,…
David LeBauer
  • 31,011
  • 31
  • 115
  • 189
5
votes
2 answers

How can I launch an x-window from emacs ess when running R on a server?

I am using emacs-snapshot with the ssh.el package, following the instructions from the ess manual. There are a few ways to open an R session, but this is how I do it: open emacs C-x C-f /server:dir/file.R this puts me in ESS [S] mode Type…
David LeBauer
  • 31,011
  • 31
  • 115
  • 189
5
votes
1 answer

dev.new() launch to second monitor

I am wondering if anyone is aware of a way to call dev.new() and have the resulting frame launch to a second monitor by default. I'm running R through ESS under Windows 7. It defaults to upper right corner of my primary…
joeln
  • 167
  • 1
  • 7
5
votes
2 answers

Why does my ESS R session fall back to C locale?

I'm on OSX Yosemite running Emacs 24.5 and R 3.2 I have this in my ~/.bash_profile: export LANG=en_US.UTF-8 export LANGUAGE=en_US:en export LC_CTYPE="en_US.UTF-8" export LC_NUMERIC="en_US.UTF-8" export LC_TIME="en_US.UTF-8" export…
kliron
  • 4,383
  • 4
  • 31
  • 47
5
votes
1 answer

interactive graphics in ESS with manipulate package

Anyone know if its possible to use these rs_ functions without RStudio? I pulled this example from the coursera class Statistical Inference, library(UsingR); data(galton) library(manipulate) myHist <- function(mu){ …
Rorschach
  • 31,301
  • 5
  • 78
  • 129