SlideShare a Scribd company logo
Learning R
and Teaching R
Today
Title: R Language and Analytics as a Profession
Agenda:
1 hour hands on R coding (beginner/intermediate level)
1 Hour talking on Analytics as a Profession
Speaker: Mr. Ajay Ohri
Venue: Room No: 511, Department of Management studies (DMS), Vishwakarma Bhawan, IIT Delhi – 110016
Date & Time: 14 June 2014, Saturday 14.30 – 16:30 Hrs
Directions to Reach the Venue:
Option A: You need to get down at Malviya Nagar/Hauz Khas Metro station and ask auto to take you just near Katwariya Sarai.
Option B: Get down at Hauz Khas Metro Station. Take Bus (511 or 511A or Battery PoweredRickshaw to reach to Sanskrit Vidya peeth
(near Katwaiya Sarai ).
Or Take Bus 764 and get down at IIT Hostel Gate. Walk a bit to reach DMS.
PLEASE NOTE-
DMS or IIT Delhi has no role in organizing this event.
New Delhi R Meetup
http://www.meetup.com/New-Delhi-R-UseR-Group/
298 members
2 Years
Sponsored
Non Commercial Group Only
Introduction
● Learning R
○ R Console
○ R Studio
○ R GUIs
○ R Cloud
● Teaching R
R from the Console
● limited lines of code can submitted at a time
● one graph can be viewed at a time
● best for either beginners or really command line users
● no syntax prompting
● help is in a separate window
R Syntax- most important
- # adding a hash or # comments out rest of sentence
comments make your code more readable
-?(keyword) looks for help on that keyword locally
-??(keyword) looks for help on that keyword in all the
documentation
Assignment
● objectname1=subset(df,df.name$var1 )
My first 25 R Commands
What’s here?
● ls()
● getwd()
● setwd()
● dir()
● rm()
What’s in my object?
● str()
● class()
● dim()
● length()
● names()
● nrowl() # and ncol()
How do I select or change stuff
● data.frame.name$variable
● data.frame[row,column]
● subset(df,df.name$var1 > X & df$var2 <Y | df$var3 ==” text”)
Function
● function1=function(x,y,z){x^2+2x*y+(z/10)-23}
Math
● log(x)
● mean(x)
● sd(x)
● median(x)
● exp(x)
Packages
● install.package(“FOO”)
● library(FOO)
● update.package()
What can I do?
● read.table()
● write.table()
● summary()
● table()
● plot()
● hist()
● boxplot()
● library(Hmisc) describe()
● library(Hmisc) summarize()
Learning R and Teaching R
Learning R and Teaching R
Install from CRAN
Downloading
Installation
Dependencies and Loading
Dependencies and Loading
My next 25 R Commands
What’s missing?
● is.na()
● na.omit()
● na.rm=T
Operators
● diff
● lag
● cumsum
Data Mining
● kmeans
● arules::apriori
● tm::tm_map
References-
http://www.statmethods.net/advstats/cluster.html
http://cran.r-project.org/web/packages/arulesViz/vignettes/arulesViz.pdf
http://cran.r-project.org/web/packages/tm/vignettes/tm.pdf
http://www.rdatamining.com/examples/association-rules
Modeling
● cor(x)
● lm(x)
● vif(a)
● outlierTest(a)
System
● system.time()
● Sys.Date()
● Sys.time()
What more can I do?
● b=ajay[sample(nrow(ajay),replace=F,
size=0.05*nrow(ajay)),]
● png(“graph.png”) Write plot as png
file
● dev.off
Data Manipulation
● as operator
● substr
● nchar
● paste
● difftime
● strptime
● lubridate::mdy
● apply functions
My favorite 15 R Packages
Data Mining
● tm
● arulesViz
● forecast
GUIs
● rattle
● Rcmdr
○ epack plugin
○ KMggplot2 plugin
● Deducer
Visualization
● ggplot2
● ggmap
Data Handling
● Dates- lubridate
● Analysis - Hmisc
● Rcurl
● XML
● jsonlite
Some more R packages
slidify
http://slidify.org/
quantmod
http://www.quantmod.com/
rocr
http://rocr.bioinf.mpi-sb.mpg.de/
r charts
http://rcharts.io/
My favorite R documentation
CRAN Views
http://cran.r-project.org/web/views/
R Documentation
http://www.rdocumentation.org/
Inside R
http://www.inside-r.org/
R Documentation
Views
Stack Overflow
Stack Overflow - for R
Interfaces to R
R Studio -IDE
GUIs - RCommander, rattle, Deducer
Online- R-fiddle, statace
Rattle GUI for Data Mining
RStudio
Rcmdr
Rcmdr
JGR
JGR
JGR with Deducer -Data Viz
R-Fiddle
Statace
Teaching R
Multiple ways to do the same thing in R - Resolve CONFUSION
GUIs can be shortcut initially -Selective Introduction to Packages
Will need command line and ?help later on -Emphasizing documentation
Pace of learning to be as per audience
Huge Scope- hence should be kept pertinent to needs
Analytics is not Statistics
R is more than a computer language or syntax
Projects are the best teachers
R Project for Researchers
● creating packages for analytics relevant to
industry
○ i.e telecom churn, rfm, ltv, retail
● any takers?
Thanks
Contact-
https://www.linkedin.com/in/ajayohri
at
ohri2007 @ gmail.com

More Related Content

PDF
R language, an introduction
PPT
linked list in c++
PDF
R programming groundup-basic-section-i
PPTX
R Programming Tutorial for Beginners - -TIB Academy
PPT
Hub102 - Lesson4 - Data Structure
PDF
Introduction to data analysis using R
PDF
Introduction to R
PDF
Data science : R Basics Harvard University
R language, an introduction
linked list in c++
R programming groundup-basic-section-i
R Programming Tutorial for Beginners - -TIB Academy
Hub102 - Lesson4 - Data Structure
Introduction to data analysis using R
Introduction to R
Data science : R Basics Harvard University

What's hot (20)

PDF
Neo4j: Graph-like power
PPTX
R programming Fundamentals
PPTX
Lecture 1 Introduction C++
PDF
Python for R Users
ODP
Graph Data -- RDF and Property Graphs
PDF
Python for R developers and data scientists
PDF
Introduction to the R Statistical Computing Environment
PPTX
Workshop presentation hands on r programming
PPT
Ease and speed of implementation
PPTX
Python for R users
PDF
Graphs, Graphs everywhere - Lucene powered relation exploration
PPTX
Python - Numpy/Pandas/Matplot Machine Learning Libraries
PDF
Understanding Hadoop through examples
PPTX
Introduction To R Language
PDF
Big Data Processing using Apache Spark and Clojure
PPTX
กระบวนการเทคโนโลยีสาระสนเทศ
PPTX
กระบวนการเทคโนโลย สาระสนเทศ1
PDF
TMPA-2017: Static Checking of Array Objects in JavaScript
PPTX
Introduction to pandas
PPTX
Intro to Functional Programming with Scala - #psuweb
Neo4j: Graph-like power
R programming Fundamentals
Lecture 1 Introduction C++
Python for R Users
Graph Data -- RDF and Property Graphs
Python for R developers and data scientists
Introduction to the R Statistical Computing Environment
Workshop presentation hands on r programming
Ease and speed of implementation
Python for R users
Graphs, Graphs everywhere - Lucene powered relation exploration
Python - Numpy/Pandas/Matplot Machine Learning Libraries
Understanding Hadoop through examples
Introduction To R Language
Big Data Processing using Apache Spark and Clojure
กระบวนการเทคโนโลยีสาระสนเทศ
กระบวนการเทคโนโลย สาระสนเทศ1
TMPA-2017: Static Checking of Array Objects in JavaScript
Introduction to pandas
Intro to Functional Programming with Scala - #psuweb
Ad

Viewers also liked (15)

PPTX
LSESU a Taste of R Language Workshop
PDF
R language Project report
PPTX
R language tutorial
PDF
Data Science - Part II - Working with R & R studio
PPTX
PPTX
T T RA power point
PPTX
R programming presentation
PPTX
R language
PDF
Managing large datasets in R – ff examples and concepts
PPTX
Introduction to basic statistics
 
PPTX
Programming in R
PPTX
R-Studio Vs. Rcmdr
PDF
Learn Power BI with Power Pivot, Power Query, Power View, Power Map and Q&A
PDF
Belt conveyor design-dunlop
PPT
Report Writing - Introduction section
LSESU a Taste of R Language Workshop
R language Project report
R language tutorial
Data Science - Part II - Working with R & R studio
T T RA power point
R programming presentation
R language
Managing large datasets in R – ff examples and concepts
Introduction to basic statistics
 
Programming in R
R-Studio Vs. Rcmdr
Learn Power BI with Power Pivot, Power Query, Power View, Power Map and Q&A
Belt conveyor design-dunlop
Report Writing - Introduction section
Ad

Similar to Learning R and Teaching R (20)

PDF
Experimental dtrace
PDF
Advanced PHP Simplified
PDF
Semantic job recommendation engine
PDF
Advanced PHP Simplified - Sunshine PHP 2018
PDF
Programming Languages: some news for the last N years
PPTX
Introduction to kotlin + spring boot demo
PDF
R for Python Users
PDF
Python for PHP developers
PDF
PPSX
Object oriented programming 2
PPT
Python classes in mumbai
PPT
Python_intro.ppt
PDF
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
PPTX
RPreliminariesdsjhfsdsfhjshfjsdhjfhjfhdfjhf
PPTX
RPreliminariesdsjhfsdsfhjshfjsdhjfhjfhdfjhf
PDF
Language translation with Deep Learning (RNN) with TensorFlow
 
PDF
Training at AI Frontiers 2018 - Lukasz Kaiser: Sequence to Sequence Learning ...
PPTX
Go Is Your Next Language — Sergii Shapoval
PDF
Tips and Tricks for Increased Development Efficiency
Experimental dtrace
Advanced PHP Simplified
Semantic job recommendation engine
Advanced PHP Simplified - Sunshine PHP 2018
Programming Languages: some news for the last N years
Introduction to kotlin + spring boot demo
R for Python Users
Python for PHP developers
Object oriented programming 2
Python classes in mumbai
Python_intro.ppt
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
RPreliminariesdsjhfsdsfhjshfjsdhjfhjfhdfjhf
RPreliminariesdsjhfsdsfhjshfjsdhjfhjfhdfjhf
Language translation with Deep Learning (RNN) with TensorFlow
 
Training at AI Frontiers 2018 - Lukasz Kaiser: Sequence to Sequence Learning ...
Go Is Your Next Language — Sergii Shapoval
Tips and Tricks for Increased Development Efficiency

More from Ajay Ohri (20)

PDF
Introduction to R ajay Ohri
PPTX
Introduction to R
PDF
Social Media and Fake News in the 2016 Election
PDF
Pyspark
PDF
Download Python for R Users pdf for free
PDF
Install spark on_windows10
DOCX
Ajay ohri Resume
PDF
Statistics for data scientists
PPTX
National seminar on emergence of internet of things (io t) trends and challe...
PDF
Tools and techniques for data science
PPTX
How Big Data ,Cloud Computing ,Data Science can help business
PDF
Training in Analytics and Data Science
PDF
Tradecraft
PDF
Software Testing for Data Scientists
PDF
Craps
PDF
A Data Science Tutorial in Python
PDF
How does cryptography work? by Jeroen Ooms
PDF
Using R for Social Media and Sports Analytics
PDF
Kush stats alpha
PPTX
Analyze this
Introduction to R ajay Ohri
Introduction to R
Social Media and Fake News in the 2016 Election
Pyspark
Download Python for R Users pdf for free
Install spark on_windows10
Ajay ohri Resume
Statistics for data scientists
National seminar on emergence of internet of things (io t) trends and challe...
Tools and techniques for data science
How Big Data ,Cloud Computing ,Data Science can help business
Training in Analytics and Data Science
Tradecraft
Software Testing for Data Scientists
Craps
A Data Science Tutorial in Python
How does cryptography work? by Jeroen Ooms
Using R for Social Media and Sports Analytics
Kush stats alpha
Analyze this

Recently uploaded (20)

PDF
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
PPTX
2. Earth - The Living Planet Module 2ELS
PPTX
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
PPTX
GEN. BIO 1 - CELL TYPES & CELL MODIFICATIONS
PDF
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
PPTX
famous lake in india and its disturibution and importance
PDF
Placing the Near-Earth Object Impact Probability in Context
DOCX
Viruses (History, structure and composition, classification, Bacteriophage Re...
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PPTX
Cell Membrane: Structure, Composition & Functions
PDF
The scientific heritage No 166 (166) (2025)
PPTX
Derivatives of integument scales, beaks, horns,.pptx
PPT
protein biochemistry.ppt for university classes
PPTX
Microbiology with diagram medical studies .pptx
PPTX
Introduction to Fisheries Biotechnology_Lesson 1.pptx
PPTX
2. Earth - The Living Planet earth and life
PPTX
neck nodes and dissection types and lymph nodes levels
PDF
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
PDF
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
PDF
Sciences of Europe No 170 (2025)
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
2. Earth - The Living Planet Module 2ELS
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
GEN. BIO 1 - CELL TYPES & CELL MODIFICATIONS
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
famous lake in india and its disturibution and importance
Placing the Near-Earth Object Impact Probability in Context
Viruses (History, structure and composition, classification, Bacteriophage Re...
7. General Toxicologyfor clinical phrmacy.pptx
Cell Membrane: Structure, Composition & Functions
The scientific heritage No 166 (166) (2025)
Derivatives of integument scales, beaks, horns,.pptx
protein biochemistry.ppt for university classes
Microbiology with diagram medical studies .pptx
Introduction to Fisheries Biotechnology_Lesson 1.pptx
2. Earth - The Living Planet earth and life
neck nodes and dissection types and lymph nodes levels
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
Sciences of Europe No 170 (2025)

Learning R and Teaching R

  • 2. Today Title: R Language and Analytics as a Profession Agenda: 1 hour hands on R coding (beginner/intermediate level) 1 Hour talking on Analytics as a Profession Speaker: Mr. Ajay Ohri Venue: Room No: 511, Department of Management studies (DMS), Vishwakarma Bhawan, IIT Delhi – 110016 Date & Time: 14 June 2014, Saturday 14.30 – 16:30 Hrs Directions to Reach the Venue: Option A: You need to get down at Malviya Nagar/Hauz Khas Metro station and ask auto to take you just near Katwariya Sarai. Option B: Get down at Hauz Khas Metro Station. Take Bus (511 or 511A or Battery PoweredRickshaw to reach to Sanskrit Vidya peeth (near Katwaiya Sarai ). Or Take Bus 764 and get down at IIT Hostel Gate. Walk a bit to reach DMS. PLEASE NOTE- DMS or IIT Delhi has no role in organizing this event.
  • 3. New Delhi R Meetup http://www.meetup.com/New-Delhi-R-UseR-Group/ 298 members 2 Years Sponsored Non Commercial Group Only
  • 4. Introduction ● Learning R ○ R Console ○ R Studio ○ R GUIs ○ R Cloud ● Teaching R
  • 5. R from the Console ● limited lines of code can submitted at a time ● one graph can be viewed at a time ● best for either beginners or really command line users ● no syntax prompting ● help is in a separate window
  • 6. R Syntax- most important - # adding a hash or # comments out rest of sentence comments make your code more readable -?(keyword) looks for help on that keyword locally -??(keyword) looks for help on that keyword in all the documentation Assignment ● objectname1=subset(df,df.name$var1 )
  • 7. My first 25 R Commands What’s here? ● ls() ● getwd() ● setwd() ● dir() ● rm() What’s in my object? ● str() ● class() ● dim() ● length() ● names() ● nrowl() # and ncol() How do I select or change stuff ● data.frame.name$variable ● data.frame[row,column] ● subset(df,df.name$var1 > X & df$var2 <Y | df$var3 ==” text”) Function ● function1=function(x,y,z){x^2+2x*y+(z/10)-23} Math ● log(x) ● mean(x) ● sd(x) ● median(x) ● exp(x) Packages ● install.package(“FOO”) ● library(FOO) ● update.package() What can I do? ● read.table() ● write.table() ● summary() ● table() ● plot() ● hist() ● boxplot() ● library(Hmisc) describe() ● library(Hmisc) summarize()
  • 15. My next 25 R Commands What’s missing? ● is.na() ● na.omit() ● na.rm=T Operators ● diff ● lag ● cumsum Data Mining ● kmeans ● arules::apriori ● tm::tm_map References- http://www.statmethods.net/advstats/cluster.html http://cran.r-project.org/web/packages/arulesViz/vignettes/arulesViz.pdf http://cran.r-project.org/web/packages/tm/vignettes/tm.pdf http://www.rdatamining.com/examples/association-rules Modeling ● cor(x) ● lm(x) ● vif(a) ● outlierTest(a) System ● system.time() ● Sys.Date() ● Sys.time() What more can I do? ● b=ajay[sample(nrow(ajay),replace=F, size=0.05*nrow(ajay)),] ● png(“graph.png”) Write plot as png file ● dev.off Data Manipulation ● as operator ● substr ● nchar ● paste ● difftime ● strptime ● lubridate::mdy ● apply functions
  • 16. My favorite 15 R Packages Data Mining ● tm ● arulesViz ● forecast GUIs ● rattle ● Rcmdr ○ epack plugin ○ KMggplot2 plugin ● Deducer Visualization ● ggplot2 ● ggmap Data Handling ● Dates- lubridate ● Analysis - Hmisc ● Rcurl ● XML ● jsonlite
  • 17. Some more R packages slidify http://slidify.org/ quantmod http://www.quantmod.com/ rocr http://rocr.bioinf.mpi-sb.mpg.de/ r charts http://rcharts.io/
  • 18. My favorite R documentation CRAN Views http://cran.r-project.org/web/views/ R Documentation http://www.rdocumentation.org/ Inside R http://www.inside-r.org/
  • 20. Views
  • 23. Interfaces to R R Studio -IDE GUIs - RCommander, rattle, Deducer Online- R-fiddle, statace
  • 24. Rattle GUI for Data Mining
  • 26. Rcmdr
  • 27. Rcmdr
  • 28. JGR
  • 29. JGR
  • 30. JGR with Deducer -Data Viz
  • 33. Teaching R Multiple ways to do the same thing in R - Resolve CONFUSION GUIs can be shortcut initially -Selective Introduction to Packages Will need command line and ?help later on -Emphasizing documentation Pace of learning to be as per audience Huge Scope- hence should be kept pertinent to needs Analytics is not Statistics R is more than a computer language or syntax Projects are the best teachers
  • 34. R Project for Researchers ● creating packages for analytics relevant to industry ○ i.e telecom churn, rfm, ltv, retail ● any takers?