# R and Hadoop: Step-by-step Tutorials

- Author: DavidMSmith
- Published: 2012-03-15
- Canonical: https://www.smartdatacollective.com/r-and-hadoop-step-step-tutorials/

At the recent [Big Data Workshop](http://www.meetup.com/Boston-Predictive-Analytics/events/47977712/) held by the Boston Predictive Analytics group, airline analyst and R user Jeffrey Breen gave a step-by-step guide to setting up an R and Hadoop infrastructure. Firstly, as a [local virtual instance of Hadoop with R](http://www.slideshare.net/jeffreybreen/big-data-stepbystep-part-1-local-vm), using VMWare and Cloudera's Hadoop Demo VM. (This is a great way to get familiar with Hadoop.) Then, as [single-machine cloud-based instance](http://www.slideshare.net/jeffreybreen/big-data-stepbystep-infrastruture-23) with lots of RAM and CPU, using Amazon EC2. (Good for more Hadoop experimentation, now with more realistic data sizes.) And finally, as a true [distributed Hadoop cluster](http://www.slideshare.net/jeffreybreen/big-data-stepbystep-infrastruture-23) in the cloud, using Apache whirr to spin up multiple nodes running Hadoop and R.

With that infrastructure set up, you're ready to start using [RHadoop](https://github.com/RevolutionAnalytics/RHadoop/wiki) to write map-reduce jobs in R. The final part of Jeffrey's workshop is a [tutorial on the rmr package](http://www.slideshare.net/jeffreybreen/big-data-stepbystep-using-r-hadoop-with-rhadoops-rmr-package), with a worked example of loading a large data airline data set of airline departures and arrivals into HDFS and using an R-based map-reduce task to calculate the scheduled (orange) and actual (yellow) total flight hours in the US over the last decade or so. (Actual time spent in the air is also shown, in blue.)

[](http://revolution-computing.typepad.com/.a/6a010534b1db25970b0168e8cd514f970c-pi)

By the way, if you're not familiar with RHadoop, project lead Antonio Piccolboni presented an overview at last month's Strata conference; I've included his [slides](http://www.slideshare.net/RevolutionAnalytics/rhadoop-r-meets-hadoop) from that presentation below. 

Jeffry Breen: S[lides from today’s Big Data Step-by-Step Tutorials: Infrastructure series and Intro to R+Hadoop with RHadoop’s rmr](http://jeffreybreen.wordpress.com/2012/03/10/big-data-step-by-step-slides/)

