2. IDEs - huh? Why?
● IDE=integrated development environment
● blurred line - many text editors have features
in this direction
● syntax highlighting (at minimum)
● integrated completion, help
● …
● Make your life easier!
4. Emacs
● Emacs is a very powerful text editor
● Serves as an IDE for any code
(e.g. C++, python, …)
● Heavy on keyboard shortcuts
● Ships with ESS=Emacs Speaks Statistics for
interacting with R, S and SAS, which has
been in development for 20 years
8. Emacs: pros/cons
Pros
● Amazingly powerful
● Very efficient editing
● Multi-code
● Great if you already
use emacs
● free/open, X-platform
Cons
● Steep learning curve
● You already use
another editor
● RSI?!
10. TextMate Workflow
TextMate is a
“plain old” text
editor (similar to
SublimeText2) TextMate
Analysis scripts
Rmd files
Shiny ui & server files
R shell
source(“file.R”)
runApp()
Shell
knitRmd
make
13. TextMate R Features
R shell
source(“file.R”)
runApp()
Can run R within TM.
Templates for most things
14. Pros, Cons
• Load up and tear down R
shells easily
• Easy to test code without
polluting analysis workspace
• Can work on remote server
with SSH
• Copy pasting to test code
• Time waiting for scripts to
reload data (caching helps)
15. Tips
• Script as much as possible with shell, R, perl etc.
• Makefiles make it easy to build workflows: https://github.com/mathew-hall/SheffieldR/blob/master/dplyr/Makefile
• Unix philosophy: Files/scripts/functions should do one thing and do it well
• Consider using virtual machines to package up your environment
• Emacs shortcuts work in R console (some in TextMate):
• ^R back-search
• ^A ^E jump to start, end of line
• ^T,M-t transpose char, word
• ^U,^K, ^Y,M-y kill to start,end of line, yank last killed text, cycle through killed text
16. R on the web - R-fiddle.org
• Don’t have access to R? Don’t panic!!!
• R-fiddle lets you use R in the cloud via your browser
• As name suggests - this is best for just fiddling….
• But you can embed the console into your own page
17. Click “save” to store code on their server
Use URL to retreive
Click embed to either embed just code, or code + console
Cool huh?!
18. Jupyter (in development)
• Building on iPython notebooks - interactive documents integrating
Python code, graphics, text etc. Easy to write if you know JSON
• Although iPython can be extended to integrate R code, Jupyter extends
the idea to numerous languages including R
• Still under development but R example notebook is viewable online