ESS - Emacs Speaks Statistics

Table of Contents

Author Barton Rhodes
Date 2017-11-08 11:56:32

Introduction

ESS - Emacs Speaks Statistics is a statistical environment with a consistent interface for: R, BUGS/JAGS, S, SAS, Stata, Julia, and others.

Why

complex statistical analysis projects require a high degree of automation and documentation which can only be handled by creating statistical analysis scripts.

Configuration options

Obligatory underscore behavior change. The default insearts '<-' on '_'

(add-hook 'ess-mode-hook
          (lambda () 
            (ess-toggle-underscore nil)))


(setq ess-eval-visibly nil)
(setq ess-ask-for-ess-directory nil)

Useful shortcuts

C-h m

Possibilites

Supports multiple processes

Each new process will be named <language>:<number>

For instance, launch multiple instances with M-x R

Lives near everything you're used to in Emacs!

company-mode, ivy / helm, Projectile, magit

Works with Tramp

For instance, run R process on a cloud instance with more RAM.

(setq tramp-default-method "ssh")

(require 'tramp)

(add-to-list 'tramp-methods
  '("gcssh"
    (tramp-login-program        "gcloud compute ssh")
    (tramp-login-args           (("%h")))
    (tramp-async-args           (("-q")))
    (tramp-remote-shell         "/bin/bash")
    (tramp-remote-shell-args    ("-c"))
    (tramp-gw-args              (("-o" "GlobalKnownHostsFile=/dev/null")
                                 ("-o" "UserKnownHostsFile=/dev/null")
                                 ("-o" "StrictHostKeyChecking=no")))
    (tramp-default-port         22)))

Dired into the directory with scripts and launch R

Supports visualizations

Spawns a new window with visualization in it - window can be resized.

Built-in debugger

Documentation

##' Description of the function
##'
##' Further details about this function
##' @title A title
##' @param me all parameters must be listed and documented
##' @return Description of the return value
##' @author The author
myfun <- function(me)
  cat("Hello", me, "\n")

Author: Lee Hinman

Created: 2017-11-08 Wed 11:56