Run remote R in Emacs with ESS

[This article was first published on YGC » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Emacs is a great front-end for most of the command line tools. Although R-Studio is pretty good, I think Emacs/ESS is better. I’ve always used Emacs/ESS to run R, since 2007 on Ubuntu, on Windows, and on my MacBook Pro. It gives me the same experiences across all platforms. I love the way Emacs formatting source codes, and literate programming with Roxygen supported.

As I need to log into the server remotely to run some computationally intensive tasks. I always write and test codes on my MacBook and copy the Rscript file to server by scp command. The Rscript file can be run through screen terminal or using nohup command.

I am wondering is it possible to write R script on my MacBook and send the command to the R running on server. After reading the ESS manual, I figure out it is very easy.

In Emacs type “M-x shell” or “M-x eshell” to run the shell. Then in shell, log into server by “ssh -X -C username@serverIP”. After logged into server, run R. Finally type “M-x ess-remote” and select “R”.

Screenshot 2013-11-14 00.41.41

Related Posts

To leave a comment for the author, please follow the link and comment on their blog: YGC » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)