SlideShare une entreprise Scribd logo
1  sur  47
David Chiu
R Language Tutorial
14/23/2013 Confidential | Copyright 2013 Trend Micro Inc.
Background of R
4/23/2013 2Confidential | Copyright 2012 Trend Micro Inc.
What is R?
• GNU Project Developed by John Chambers @ Bell Lab
• Free software environment for statistical computing and graphics
• Functional programming language written primarily in C, Fortran
4/23/2013 3Confidential | Copyright 2012 Trend Micro Inc.
R Language
• R is functional programming language
• R is an interpreted language
• R is object oriented-language
Why Using R
• Statistic analysis on the fly
• Mathematical function and graphic module embedded
• FREE! & Open Source!
– http://cran.r-project.org/src/base/
Kaggle
http://www.kaggle.com/
R is the most widely language used by
kaggle participants
Data Scientist of these Companies Using R
What is your programming language of
choice, R, Python or something else?
“I use R, and occasionally matlab, for data analysis. There is
a large, active and extremely knowledgeable R community at
Google.”
http://simplystatistics.org/2013/02/15/interview-with-nick-chamandy-statistician-at-google/
4/23/2013 7Confidential | Copyright 2013 Trend Micro Inc.
“Expert knowledge of SAS (With Enterprise
Guide/Miner) required and candidates with
strong knowledge of R will be preferred”
http://www.kdnuggets.com/jobs/13/03-29-apple-sr-data-
scientist.html?utm_source=twitterfeed&utm_medium=facebook&utm_campaign=t
fb&utm_content=FaceBook&utm_term=analytics#.UVXibgXOpfc.facebook
Commercial support for R
• In 2007, Revolution Analytics providea commercial support for
Revolution R
– http://www.revolutionanalytics.com/products/revolution-r.php
– http://www.revolutionanalytics.com/why-revolution-r/which-r-is-right-for-me.php
• Big Data Appliance, which integrates R, Apache Hadoop, Oracle
Enterprise Linux, and a NoSQL database with the
Exadata hardware
– http://www.oracle.com/us/products/database/big-data-
appliance/overview/index.html
Revolotion R
• Free for Community Version
– http://www.revolutionanalytics.com/downloads/
– http://www.revolutionanalytics.com/why-revolution-r/benchmarks.php
4/23/2013 9Confidential | Copyright 2013 Trend Micro Inc.
Base R 2.14.2
64
Revolution R
(1-core)
Revolution R
(4-core)
Speedup (4 core)
Matrix
Calculation
17.4 sec 2.9 sec 2.0 sec 7.9x
Matrix Functions 10.3 sec 2.0 sec 1.2 sec 7.8x
Program Control 2.7 sec 2.7 sec 2.7 sec Not Appreciable
IDE
R Studio
• http://www.rstudio.com/
4/23/2013 10Confidential | Copyright 2013 Trend Micro Inc.
RGUI
• http://www.r-project.org/
Web App Development
Shiny makes it super simple for R users like you to turn
analyses into interactive web applications that anyone
can use
http://www.rstudio.com/shiny/
4/23/2013 11Confidential | Copyright 2013 Trend Micro Inc.
Package Management
• CRAN (Comprehensive R Archive Network)
4/23/2013 12Confidential | Copyright 2013 Trend Micro Inc.
Repository URL
CRAN http://cran.r-project.org/web/packages/
Bioconductor http://www.bioconductor.org/packages/release/Software.html
R-Forge http://r-forge.r-project.org/
R Basic
4/23/2013 13Confidential | Copyright 2012 Trend Micro Inc.
Basic Command
• help()
– help(demo)
• demo()
– demo(is.things)
• q()
• ls()
• rm()
– rm(x)
4/23/2013 14Confidential | Copyright 2013 Trend Micro Inc.
Basic Object
• Vector
• List
• Factor
• Array
• Matrix
• Data Frame
4/23/2013 15Confidential | Copyright 2013 Trend Micro Inc.
Objects & Arithmetic
• Scalar
– x=3; y<-5; x+y
• Vectors
– x = c(1,2,3, 7); y= c(2,3,5,1); x+y; x*y; x – y; x/y;
– x =seq(1,10); y= 2:11; x+y
– x =seq(1,10,by=2); y =seq(1,10,length=2)
– rep(c(5,8), 3)
– x= c(1,2,3); length(x)
4/23/2013 16Confidential | Copyright 2013 Trend Micro Inc.
Summaries and Subscripting
• Summary
– X = c(1,2,3,4,5,6,7,8,9,10)
– mean(x), min(x), median(x), max(x), var(x)
– summary(x)
• Subscripting
– x = c(1,2,3,4,5,6,7,8,9,10)
– x[1:3]; x[c(1,3,5)];
– x[c(1,3,5)] * 2 + x[c(2,2,2)]
– x[-(1:6)]
4/23/2013 17Confidential | Copyright 2013 Trend Micro Inc.
Lists
• Contain a heterogeneous selection of objects
– e <- list(thing="hat", size="8.25"); e
– l <- list(a=1,b=2,c=3,d=4,e=5,f=6,g=7,h=8,i=9,j=10)
– l$j
– man = list(name="Qoo", height=183); man$name
Factor
• Ordered collection of items to present categorical value
• Different values that the factor can take are called levels
• Factors
– phone =
factor(c('iphone', 'htc', 'iphone', 'samsung', 'iphone', 'samsung'))
– levels(phone)
4/23/2013 19Confidential | Copyright 2013 Trend Micro Inc.
Matrices & Array
• Array
– An extension of a vector to more than two dimensions
– a <- array(c(1,2,3,4,5,6,7,8,9,10,11,12),dim=c(3,4))
• Matrices
– A vector to two dimensions – 2d-array
– x = c(1,2,3); y = c(4,5,6); rbind(x,y);cbind(x,y)
– x = rbind(c(1,2,3),c(4,5,6)); dim(x)
– x<-matrix(c(1,2,3,4,5,6),nr=3);
– x<-matrix(c(1,2,3,4,5,6),nrow=3, ,byrow=T)
– x<-matrix(c(1,2,3,4),nr=2);y<-matrix(c(5,6),nr=2); x%*%y
– t(matrix(c(1,2,3,4),nr=2))
– solve(matrix(c(1,2,3,4),nr=2))
Data Frame
• Useful way to represent tabular data
• essentially a matrix with named columns may also
include non-numerical variables
• Example
– df = data.frame(a=c(1,2,3,4,5),b=c(2,3,4,5,6));df
Function
• Function
– `%myop%` <- function(a, b) {2*a + 2*b}; 1 %myop% 1
– f <- function(x) {return(x^2 + 3)}
create.vector.of.ones <- function(n) {
return.vector <- NA;
for (i in 1:n) {
return.vector[i] <- 1;
} return.vector;
}
– create.vector.of.ones(3)
• Control Structures
– If …else…
– Repeat, for, while
• Catch error – trycatch
Anonymous Function
• Functional language Characteristic
– apply.to.three <- function(f) {f(3)}
– apply.to.three(function(x) {x * 7})
Objects and Classes
• All R code manipulates objects.
• Every object in R has a type
• In assignment statements, R will copy the object, not
just the reference to the object Attributes
S3 & S4 Object
• Many R functions were implemented using S3 methods
• In S version 4 (hence S4), formal classes and methods
were introduced that allowed
– Multiple arguments
– Abstract types
– inheritance.
OOP of S4
• S4 OOP Example
– setClass("Student", representation(name =
"character", score="numeric"))
– studenta = new ("Student", name="david", score=80 )
– studentb = new ("Student", name="andy", score=90 )
setMethod("show", signature("Student"),
function(object) {
cat(object@score+100)
})
– setGeneric("getscore", function(object)
standardGeneric("getscore"))
– Studenta
Packages
• A package is a related set of functions, help files, and
data files that have been bundled together.
• Basic Command
– library(rpart)
– CRAN
– Install
– (.packages())
Package used in Machine Learning for
Hackers
4/23/2013 28Confidential | Copyright 2013 Trend Micro Inc.
Apply
• Apply
– Returns a vector or array or list of values obtained by applying a
function to margins of an array or matrix.
– data <- cbind(c(1,2),c(3,4))
– data.rowsum <- apply(data,1,sum)
– data.colsum <- apply(data,2,sum)
– data
4/23/2013 29Confidential | Copyright 2013 Trend Micro Inc.
Apply
• lapply
– returns a list of the same length as X, each element of which is
the result of applying FUN to the corresponding element of X.
• sapply
– is a user-friendly version and wrapper of lapply by default
returning a vector, matrix or
• vapply
– is similar to sapply, but has a pre-specified type of return
value, so it can be safer (and sometimes faster) to use.
4/23/2013 30Confidential | Copyright 2013 Trend Micro Inc.
File IO
• Save and Load
– x = USPersonalExpenditure
– save(x, file="~/test.RData")
– rm(x)
– load("~/test.RData")
– x
Charts and Graphics
Plotting Example
– xrange = range(as.numeric(colnames(USPersonalExpenditure)));
– yrange= range(USPersonalExpenditure);
– plot(xrange, yrange, type="n", xlab="Year",ylab="Category" )
– for(i in 1:5) {
lines(as.numeric(colnames(USPersonalExpenditure)),USPersonalExpenditur
e[i,], type="b", lwd=1.5)
}
IRIS Dataset
• data()
IRIS Dataset
• The Iris flower data set or Fisher's Iris data set is
a multivariate data set introduced by Sir Ronald
Fisher (1936) as an example ofdiscriminant analysis.[1] It
is sometimes called Anderson's Iris data set
– http://en.wikipedia.org/wiki/Iris_flower_data_set
4/23/2013 35Confidential | Copyright 2013 Trend Micro Inc.
Iris setosa Iris versicolor Iris virginica
Classification of IRIS
• Classification Example
– install.packages("e1071")
– pairs(iris[1:4],main="Iris Data
(red=setosa,green=versicolor,blue=virginica)", pch=21,
bg=c("red","green3","blue")[unclass(iris$Species)])
– classifier<-naiveBayes(iris[,1:4], iris[,5])
– table(predict(classifier, iris[,-5]), iris[,5])
– classifier<-svm(iris[,1:4], iris[,5]) > table(predict(classifier, iris[,-
5]), iris[,5] + )
– prediction = predict(classifier, iris[,1:4])
• http://en.wikibooks.org/wiki/Data_Mining_Algorithms_In_R/Classification/Na%C3%A
Fve_Bayes
4/23/2013 36Confidential | Copyright 2013 Trend Micro Inc.
Performance Tips
• Use Built-in Math Functions
• Use Environments for Lookup Tables
• Use a Database to Query Large Data Sets
• Preallocate Memory
• Monitor How Much Memory You Are Using
• Cleaning Up Objects
• Functions for Big Data Sets
• Parallel Computation with R
R for Machine Learning
4/23/2013 38Confidential | Copyright 2012 Trend Micro Inc.
Helps of the Topic
• ?read.delim
– # Access a function's help file
• ??base::delim
– # Search for 'delim' in all help files for functions in 'base'
• help.search("delimited")
– # Search for 'delimited' in all help files
• RSiteSearch("parsing text")
– # Search for the term 'parsing text' on the R site.
Sample Code of Chapter 1
• https://github.com/johnmyleswhite/ML_for_Hackers.git
4/23/2013 40Confidential | Copyright 2013 Trend Micro Inc.
Reference & Resource
4/23/2013 41Confidential | Copyright 2012 Trend Micro Inc.
Study Material
• R in a nutshell
4/23/2013 42Confidential | Copyright 2013 Trend Micro Inc.
Online Reference
4/23/2013 43Confidential | Copyright 2013 Trend Micro Inc.
Community Resources for R help
4/23/2013 44Confidential | Copyright 2013 Trend Micro Inc.
Resource
• Websites
– Stackoverflow
– Cross Validated
– R-help
– R-devel
– R-sig-*
– Package-specific mailing list
• Blog
– R-bloggers
• Twitter
– https://twitter.com/#rstats
• Quora
– http://www.quora.com/R-software
4/23/2013 45Confidential | Copyright 2013 Trend Micro Inc.
Resource (Con’d)
• Conference
– useR!
– R in Finance
– R in Insurance
– Others
– Joint Statistical Meetings
– Royal Statistical Society Conference
• Local User Group
– http://blog.revolutionanalytics.com/local-r-groups.html
• Taiwan R User Group
– http://www.facebook.com/Tw.R.User
– http://www.meetup.com/Taiwan-R/
4/23/2013 46Confidential | Copyright 2013 Trend Micro Inc.
Thank You!
4/23/2013 47Confidential | Copyright 2012 Trend Micro Inc.

Contenu connexe

Tendances

3. R- list and data frame
3. R- list and data frame3. R- list and data frame
3. R- list and data framekrishna singh
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programmingNimrita Koul
 
Basic of python for data analysis
Basic of python for data analysisBasic of python for data analysis
Basic of python for data analysisPramod Toraskar
 
R programming slides
R  programming slidesR  programming slides
R programming slidesPankaj Saini
 
R programming presentation
R programming presentationR programming presentation
R programming presentationAkshat Sharma
 
Unit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptxUnit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptxMalla Reddy University
 
Introduction to Rstudio
Introduction to RstudioIntroduction to Rstudio
Introduction to RstudioOlga Scrivner
 
Data visualization tools & techniques - 1
Data visualization tools & techniques - 1Data visualization tools & techniques - 1
Data visualization tools & techniques - 1Korivi Sravan Kumar
 
Descriptive Statistics with R
Descriptive Statistics with RDescriptive Statistics with R
Descriptive Statistics with RKazuki Yoshida
 
Data Analysis and Programming in R
Data Analysis and Programming in RData Analysis and Programming in R
Data Analysis and Programming in REshwar Sai
 
R Programming: Introduction to Matrices
R Programming: Introduction to MatricesR Programming: Introduction to Matrices
R Programming: Introduction to MatricesRsquared Academy
 
Introduction to R Graphics with ggplot2
Introduction to R Graphics with ggplot2Introduction to R Graphics with ggplot2
Introduction to R Graphics with ggplot2izahn
 
Data analytics using R programming
Data analytics using R programmingData analytics using R programming
Data analytics using R programmingUmang Singh
 

Tendances (20)

Step By Step Guide to Learn R
Step By Step Guide to Learn RStep By Step Guide to Learn R
Step By Step Guide to Learn R
 
3. R- list and data frame
3. R- list and data frame3. R- list and data frame
3. R- list and data frame
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programming
 
R programming
R programmingR programming
R programming
 
R studio
R studio R studio
R studio
 
Basic of python for data analysis
Basic of python for data analysisBasic of python for data analysis
Basic of python for data analysis
 
Data Management in R
Data Management in RData Management in R
Data Management in R
 
Unit 1 - R Programming (Part 2).pptx
Unit 1 - R Programming (Part 2).pptxUnit 1 - R Programming (Part 2).pptx
Unit 1 - R Programming (Part 2).pptx
 
R programming slides
R  programming slidesR  programming slides
R programming slides
 
R programming presentation
R programming presentationR programming presentation
R programming presentation
 
Unit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptxUnit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptx
 
3 Data Structure in R
3 Data Structure in R3 Data Structure in R
3 Data Structure in R
 
Introduction to Rstudio
Introduction to RstudioIntroduction to Rstudio
Introduction to Rstudio
 
Data visualization tools & techniques - 1
Data visualization tools & techniques - 1Data visualization tools & techniques - 1
Data visualization tools & techniques - 1
 
Descriptive Statistics with R
Descriptive Statistics with RDescriptive Statistics with R
Descriptive Statistics with R
 
Data Visualization With R
Data Visualization With RData Visualization With R
Data Visualization With R
 
Data Analysis and Programming in R
Data Analysis and Programming in RData Analysis and Programming in R
Data Analysis and Programming in R
 
R Programming: Introduction to Matrices
R Programming: Introduction to MatricesR Programming: Introduction to Matrices
R Programming: Introduction to Matrices
 
Introduction to R Graphics with ggplot2
Introduction to R Graphics with ggplot2Introduction to R Graphics with ggplot2
Introduction to R Graphics with ggplot2
 
Data analytics using R programming
Data analytics using R programmingData analytics using R programming
Data analytics using R programming
 

Similaire à R Language Tutorial Overview

India software developers conference 2013 Bangalore
India software developers conference 2013 BangaloreIndia software developers conference 2013 Bangalore
India software developers conference 2013 BangaloreSatnam Singh
 
Machine Learning in R
Machine Learning in RMachine Learning in R
Machine Learning in RSujaAldrin
 
A Hands-on Intro to Data Science and R Presentation.ppt
A Hands-on Intro to Data Science and R Presentation.pptA Hands-on Intro to Data Science and R Presentation.ppt
A Hands-on Intro to Data Science and R Presentation.pptSanket Shikhar
 
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdfSTAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdfSOUMIQUE AHAMED
 
Intro to Apache Spark by Marco Vasquez
Intro to Apache Spark by Marco VasquezIntro to Apache Spark by Marco Vasquez
Intro to Apache Spark by Marco VasquezMapR Technologies
 
Introduction to Mahout
Introduction to MahoutIntroduction to Mahout
Introduction to MahoutTed Dunning
 
Introduction to Mahout given at Twin Cities HUG
Introduction to Mahout given at Twin Cities HUGIntroduction to Mahout given at Twin Cities HUG
Introduction to Mahout given at Twin Cities HUGMapR Technologies
 
Reproducibility with R
Reproducibility with RReproducibility with R
Reproducibility with RMartin Jung
 
2014-10-10-SBC361-Reproducible research
2014-10-10-SBC361-Reproducible research2014-10-10-SBC361-Reproducible research
2014-10-10-SBC361-Reproducible researchYannick Wurm
 
IRJET- A Survey on Predictive Analytics and Parallel Algorithms for Knowl...
IRJET-  	  A Survey on Predictive Analytics and Parallel Algorithms for Knowl...IRJET-  	  A Survey on Predictive Analytics and Parallel Algorithms for Knowl...
IRJET- A Survey on Predictive Analytics and Parallel Algorithms for Knowl...IRJET Journal
 
A Workshop on R
A Workshop on RA Workshop on R
A Workshop on RAjay Ohri
 
Introduction to R for data science
Introduction to R for data scienceIntroduction to R for data science
Introduction to R for data scienceLong Nguyen
 
RDataMining slides-r-programming
RDataMining slides-r-programmingRDataMining slides-r-programming
RDataMining slides-r-programmingYanchang Zhao
 
Research @ RELEASeD (presented at SATTOSE2013)
Research @ RELEASeD (presented at SATTOSE2013)Research @ RELEASeD (presented at SATTOSE2013)
Research @ RELEASeD (presented at SATTOSE2013)kim.mens
 
PGQL: A Language for Graphs
PGQL: A Language for GraphsPGQL: A Language for Graphs
PGQL: A Language for GraphsJean Ihm
 
DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...
DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...
DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...DataMind-slides
 

Similaire à R Language Tutorial Overview (20)

R tutorial
R tutorialR tutorial
R tutorial
 
India software developers conference 2013 Bangalore
India software developers conference 2013 BangaloreIndia software developers conference 2013 Bangalore
India software developers conference 2013 Bangalore
 
Machine Learning in R
Machine Learning in RMachine Learning in R
Machine Learning in R
 
R- Introduction
R- IntroductionR- Introduction
R- Introduction
 
A Hands-on Intro to Data Science and R Presentation.ppt
A Hands-on Intro to Data Science and R Presentation.pptA Hands-on Intro to Data Science and R Presentation.ppt
A Hands-on Intro to Data Science and R Presentation.ppt
 
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdfSTAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
 
Intro to Apache Spark by Marco Vasquez
Intro to Apache Spark by Marco VasquezIntro to Apache Spark by Marco Vasquez
Intro to Apache Spark by Marco Vasquez
 
Introduction to Mahout
Introduction to MahoutIntroduction to Mahout
Introduction to Mahout
 
Introduction to Mahout given at Twin Cities HUG
Introduction to Mahout given at Twin Cities HUGIntroduction to Mahout given at Twin Cities HUG
Introduction to Mahout given at Twin Cities HUG
 
Reproducibility with R
Reproducibility with RReproducibility with R
Reproducibility with R
 
2014-10-10-SBC361-Reproducible research
2014-10-10-SBC361-Reproducible research2014-10-10-SBC361-Reproducible research
2014-10-10-SBC361-Reproducible research
 
IRJET- A Survey on Predictive Analytics and Parallel Algorithms for Knowl...
IRJET-  	  A Survey on Predictive Analytics and Parallel Algorithms for Knowl...IRJET-  	  A Survey on Predictive Analytics and Parallel Algorithms for Knowl...
IRJET- A Survey on Predictive Analytics and Parallel Algorithms for Knowl...
 
A Workshop on R
A Workshop on RA Workshop on R
A Workshop on R
 
Introduction to R for data science
Introduction to R for data scienceIntroduction to R for data science
Introduction to R for data science
 
RDataMining slides-r-programming
RDataMining slides-r-programmingRDataMining slides-r-programming
RDataMining slides-r-programming
 
Research @ RELEASeD (presented at SATTOSE2013)
Research @ RELEASeD (presented at SATTOSE2013)Research @ RELEASeD (presented at SATTOSE2013)
Research @ RELEASeD (presented at SATTOSE2013)
 
User 2013-oracle-big-data-analytics-1971985
User 2013-oracle-big-data-analytics-1971985User 2013-oracle-big-data-analytics-1971985
User 2013-oracle-big-data-analytics-1971985
 
Basics of R
Basics of RBasics of R
Basics of R
 
PGQL: A Language for Graphs
PGQL: A Language for GraphsPGQL: A Language for Graphs
PGQL: A Language for Graphs
 
DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...
DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...
DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...
 

Plus de David Chiu

無中生有 - 利用外部數據打造新商業模式
無中生有 - 利用外部數據打造新商業模式無中生有 - 利用外部數據打造新商業模式
無中生有 - 利用外部數據打造新商業模式David Chiu
 
洞見未來,用python 與 r 結合深度學習技術預測趨勢
洞見未來,用python 與 r 結合深度學習技術預測趨勢洞見未來,用python 與 r 結合深度學習技術預測趨勢
洞見未來,用python 與 r 結合深度學習技術預測趨勢David Chiu
 
python 實戰資料科學工作坊
python 實戰資料科學工作坊python 實戰資料科學工作坊
python 實戰資料科學工作坊David Chiu
 
新聞 X 謊言 用文字探勘挖掘財經新聞沒告訴你的真相(丘祐瑋)
新聞 X 謊言 用文字探勘挖掘財經新聞沒告訴你的真相(丘祐瑋)新聞 X 謊言 用文字探勘挖掘財經新聞沒告訴你的真相(丘祐瑋)
新聞 X 謊言 用文字探勘挖掘財經新聞沒告訴你的真相(丘祐瑋)David Chiu
 
Data Analysis - Making Big Data Work
Data Analysis - Making Big Data WorkData Analysis - Making Big Data Work
Data Analysis - Making Big Data WorkDavid Chiu
 
PyCon APAC 2014 - Social Network Analysis Using Python (David Chiu)
PyCon APAC 2014 - Social Network Analysis Using Python (David Chiu)PyCon APAC 2014 - Social Network Analysis Using Python (David Chiu)
PyCon APAC 2014 - Social Network Analysis Using Python (David Chiu)David Chiu
 
Big Data Analysis With RHadoop
Big Data Analysis With RHadoopBig Data Analysis With RHadoop
Big Data Analysis With RHadoopDavid Chiu
 
Social Network Analysis With R
Social Network Analysis With RSocial Network Analysis With R
Social Network Analysis With RDavid Chiu
 
Machine Learning With R
Machine Learning With RMachine Learning With R
Machine Learning With RDavid Chiu
 
Hidden Markov Model & Stock Prediction
Hidden Markov Model & Stock PredictionHidden Markov Model & Stock Prediction
Hidden Markov Model & Stock PredictionDavid Chiu
 

Plus de David Chiu (10)

無中生有 - 利用外部數據打造新商業模式
無中生有 - 利用外部數據打造新商業模式無中生有 - 利用外部數據打造新商業模式
無中生有 - 利用外部數據打造新商業模式
 
洞見未來,用python 與 r 結合深度學習技術預測趨勢
洞見未來,用python 與 r 結合深度學習技術預測趨勢洞見未來,用python 與 r 結合深度學習技術預測趨勢
洞見未來,用python 與 r 結合深度學習技術預測趨勢
 
python 實戰資料科學工作坊
python 實戰資料科學工作坊python 實戰資料科學工作坊
python 實戰資料科學工作坊
 
新聞 X 謊言 用文字探勘挖掘財經新聞沒告訴你的真相(丘祐瑋)
新聞 X 謊言 用文字探勘挖掘財經新聞沒告訴你的真相(丘祐瑋)新聞 X 謊言 用文字探勘挖掘財經新聞沒告訴你的真相(丘祐瑋)
新聞 X 謊言 用文字探勘挖掘財經新聞沒告訴你的真相(丘祐瑋)
 
Data Analysis - Making Big Data Work
Data Analysis - Making Big Data WorkData Analysis - Making Big Data Work
Data Analysis - Making Big Data Work
 
PyCon APAC 2014 - Social Network Analysis Using Python (David Chiu)
PyCon APAC 2014 - Social Network Analysis Using Python (David Chiu)PyCon APAC 2014 - Social Network Analysis Using Python (David Chiu)
PyCon APAC 2014 - Social Network Analysis Using Python (David Chiu)
 
Big Data Analysis With RHadoop
Big Data Analysis With RHadoopBig Data Analysis With RHadoop
Big Data Analysis With RHadoop
 
Social Network Analysis With R
Social Network Analysis With RSocial Network Analysis With R
Social Network Analysis With R
 
Machine Learning With R
Machine Learning With RMachine Learning With R
Machine Learning With R
 
Hidden Markov Model & Stock Prediction
Hidden Markov Model & Stock PredictionHidden Markov Model & Stock Prediction
Hidden Markov Model & Stock Prediction
 

Dernier

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 

Dernier (20)

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 

R Language Tutorial Overview

  • 1. David Chiu R Language Tutorial 14/23/2013 Confidential | Copyright 2013 Trend Micro Inc.
  • 2. Background of R 4/23/2013 2Confidential | Copyright 2012 Trend Micro Inc.
  • 3. What is R? • GNU Project Developed by John Chambers @ Bell Lab • Free software environment for statistical computing and graphics • Functional programming language written primarily in C, Fortran 4/23/2013 3Confidential | Copyright 2012 Trend Micro Inc.
  • 4. R Language • R is functional programming language • R is an interpreted language • R is object oriented-language
  • 5. Why Using R • Statistic analysis on the fly • Mathematical function and graphic module embedded • FREE! & Open Source! – http://cran.r-project.org/src/base/
  • 6. Kaggle http://www.kaggle.com/ R is the most widely language used by kaggle participants
  • 7. Data Scientist of these Companies Using R What is your programming language of choice, R, Python or something else? “I use R, and occasionally matlab, for data analysis. There is a large, active and extremely knowledgeable R community at Google.” http://simplystatistics.org/2013/02/15/interview-with-nick-chamandy-statistician-at-google/ 4/23/2013 7Confidential | Copyright 2013 Trend Micro Inc. “Expert knowledge of SAS (With Enterprise Guide/Miner) required and candidates with strong knowledge of R will be preferred” http://www.kdnuggets.com/jobs/13/03-29-apple-sr-data- scientist.html?utm_source=twitterfeed&utm_medium=facebook&utm_campaign=t fb&utm_content=FaceBook&utm_term=analytics#.UVXibgXOpfc.facebook
  • 8. Commercial support for R • In 2007, Revolution Analytics providea commercial support for Revolution R – http://www.revolutionanalytics.com/products/revolution-r.php – http://www.revolutionanalytics.com/why-revolution-r/which-r-is-right-for-me.php • Big Data Appliance, which integrates R, Apache Hadoop, Oracle Enterprise Linux, and a NoSQL database with the Exadata hardware – http://www.oracle.com/us/products/database/big-data- appliance/overview/index.html
  • 9. Revolotion R • Free for Community Version – http://www.revolutionanalytics.com/downloads/ – http://www.revolutionanalytics.com/why-revolution-r/benchmarks.php 4/23/2013 9Confidential | Copyright 2013 Trend Micro Inc. Base R 2.14.2 64 Revolution R (1-core) Revolution R (4-core) Speedup (4 core) Matrix Calculation 17.4 sec 2.9 sec 2.0 sec 7.9x Matrix Functions 10.3 sec 2.0 sec 1.2 sec 7.8x Program Control 2.7 sec 2.7 sec 2.7 sec Not Appreciable
  • 10. IDE R Studio • http://www.rstudio.com/ 4/23/2013 10Confidential | Copyright 2013 Trend Micro Inc. RGUI • http://www.r-project.org/
  • 11. Web App Development Shiny makes it super simple for R users like you to turn analyses into interactive web applications that anyone can use http://www.rstudio.com/shiny/ 4/23/2013 11Confidential | Copyright 2013 Trend Micro Inc.
  • 12. Package Management • CRAN (Comprehensive R Archive Network) 4/23/2013 12Confidential | Copyright 2013 Trend Micro Inc. Repository URL CRAN http://cran.r-project.org/web/packages/ Bioconductor http://www.bioconductor.org/packages/release/Software.html R-Forge http://r-forge.r-project.org/
  • 13. R Basic 4/23/2013 13Confidential | Copyright 2012 Trend Micro Inc.
  • 14. Basic Command • help() – help(demo) • demo() – demo(is.things) • q() • ls() • rm() – rm(x) 4/23/2013 14Confidential | Copyright 2013 Trend Micro Inc.
  • 15. Basic Object • Vector • List • Factor • Array • Matrix • Data Frame 4/23/2013 15Confidential | Copyright 2013 Trend Micro Inc.
  • 16. Objects & Arithmetic • Scalar – x=3; y<-5; x+y • Vectors – x = c(1,2,3, 7); y= c(2,3,5,1); x+y; x*y; x – y; x/y; – x =seq(1,10); y= 2:11; x+y – x =seq(1,10,by=2); y =seq(1,10,length=2) – rep(c(5,8), 3) – x= c(1,2,3); length(x) 4/23/2013 16Confidential | Copyright 2013 Trend Micro Inc.
  • 17. Summaries and Subscripting • Summary – X = c(1,2,3,4,5,6,7,8,9,10) – mean(x), min(x), median(x), max(x), var(x) – summary(x) • Subscripting – x = c(1,2,3,4,5,6,7,8,9,10) – x[1:3]; x[c(1,3,5)]; – x[c(1,3,5)] * 2 + x[c(2,2,2)] – x[-(1:6)] 4/23/2013 17Confidential | Copyright 2013 Trend Micro Inc.
  • 18. Lists • Contain a heterogeneous selection of objects – e <- list(thing="hat", size="8.25"); e – l <- list(a=1,b=2,c=3,d=4,e=5,f=6,g=7,h=8,i=9,j=10) – l$j – man = list(name="Qoo", height=183); man$name
  • 19. Factor • Ordered collection of items to present categorical value • Different values that the factor can take are called levels • Factors – phone = factor(c('iphone', 'htc', 'iphone', 'samsung', 'iphone', 'samsung')) – levels(phone) 4/23/2013 19Confidential | Copyright 2013 Trend Micro Inc.
  • 20. Matrices & Array • Array – An extension of a vector to more than two dimensions – a <- array(c(1,2,3,4,5,6,7,8,9,10,11,12),dim=c(3,4)) • Matrices – A vector to two dimensions – 2d-array – x = c(1,2,3); y = c(4,5,6); rbind(x,y);cbind(x,y) – x = rbind(c(1,2,3),c(4,5,6)); dim(x) – x<-matrix(c(1,2,3,4,5,6),nr=3); – x<-matrix(c(1,2,3,4,5,6),nrow=3, ,byrow=T) – x<-matrix(c(1,2,3,4),nr=2);y<-matrix(c(5,6),nr=2); x%*%y – t(matrix(c(1,2,3,4),nr=2)) – solve(matrix(c(1,2,3,4),nr=2))
  • 21. Data Frame • Useful way to represent tabular data • essentially a matrix with named columns may also include non-numerical variables • Example – df = data.frame(a=c(1,2,3,4,5),b=c(2,3,4,5,6));df
  • 22. Function • Function – `%myop%` <- function(a, b) {2*a + 2*b}; 1 %myop% 1 – f <- function(x) {return(x^2 + 3)} create.vector.of.ones <- function(n) { return.vector <- NA; for (i in 1:n) { return.vector[i] <- 1; } return.vector; } – create.vector.of.ones(3) • Control Structures – If …else… – Repeat, for, while • Catch error – trycatch
  • 23. Anonymous Function • Functional language Characteristic – apply.to.three <- function(f) {f(3)} – apply.to.three(function(x) {x * 7})
  • 24. Objects and Classes • All R code manipulates objects. • Every object in R has a type • In assignment statements, R will copy the object, not just the reference to the object Attributes
  • 25. S3 & S4 Object • Many R functions were implemented using S3 methods • In S version 4 (hence S4), formal classes and methods were introduced that allowed – Multiple arguments – Abstract types – inheritance.
  • 26. OOP of S4 • S4 OOP Example – setClass("Student", representation(name = "character", score="numeric")) – studenta = new ("Student", name="david", score=80 ) – studentb = new ("Student", name="andy", score=90 ) setMethod("show", signature("Student"), function(object) { cat(object@score+100) }) – setGeneric("getscore", function(object) standardGeneric("getscore")) – Studenta
  • 27. Packages • A package is a related set of functions, help files, and data files that have been bundled together. • Basic Command – library(rpart) – CRAN – Install – (.packages())
  • 28. Package used in Machine Learning for Hackers 4/23/2013 28Confidential | Copyright 2013 Trend Micro Inc.
  • 29. Apply • Apply – Returns a vector or array or list of values obtained by applying a function to margins of an array or matrix. – data <- cbind(c(1,2),c(3,4)) – data.rowsum <- apply(data,1,sum) – data.colsum <- apply(data,2,sum) – data 4/23/2013 29Confidential | Copyright 2013 Trend Micro Inc.
  • 30. Apply • lapply – returns a list of the same length as X, each element of which is the result of applying FUN to the corresponding element of X. • sapply – is a user-friendly version and wrapper of lapply by default returning a vector, matrix or • vapply – is similar to sapply, but has a pre-specified type of return value, so it can be safer (and sometimes faster) to use. 4/23/2013 30Confidential | Copyright 2013 Trend Micro Inc.
  • 31. File IO • Save and Load – x = USPersonalExpenditure – save(x, file="~/test.RData") – rm(x) – load("~/test.RData") – x
  • 33. Plotting Example – xrange = range(as.numeric(colnames(USPersonalExpenditure))); – yrange= range(USPersonalExpenditure); – plot(xrange, yrange, type="n", xlab="Year",ylab="Category" ) – for(i in 1:5) { lines(as.numeric(colnames(USPersonalExpenditure)),USPersonalExpenditur e[i,], type="b", lwd=1.5) }
  • 35. IRIS Dataset • The Iris flower data set or Fisher's Iris data set is a multivariate data set introduced by Sir Ronald Fisher (1936) as an example ofdiscriminant analysis.[1] It is sometimes called Anderson's Iris data set – http://en.wikipedia.org/wiki/Iris_flower_data_set 4/23/2013 35Confidential | Copyright 2013 Trend Micro Inc. Iris setosa Iris versicolor Iris virginica
  • 36. Classification of IRIS • Classification Example – install.packages("e1071") – pairs(iris[1:4],main="Iris Data (red=setosa,green=versicolor,blue=virginica)", pch=21, bg=c("red","green3","blue")[unclass(iris$Species)]) – classifier<-naiveBayes(iris[,1:4], iris[,5]) – table(predict(classifier, iris[,-5]), iris[,5]) – classifier<-svm(iris[,1:4], iris[,5]) > table(predict(classifier, iris[,- 5]), iris[,5] + ) – prediction = predict(classifier, iris[,1:4]) • http://en.wikibooks.org/wiki/Data_Mining_Algorithms_In_R/Classification/Na%C3%A Fve_Bayes 4/23/2013 36Confidential | Copyright 2013 Trend Micro Inc.
  • 37. Performance Tips • Use Built-in Math Functions • Use Environments for Lookup Tables • Use a Database to Query Large Data Sets • Preallocate Memory • Monitor How Much Memory You Are Using • Cleaning Up Objects • Functions for Big Data Sets • Parallel Computation with R
  • 38. R for Machine Learning 4/23/2013 38Confidential | Copyright 2012 Trend Micro Inc.
  • 39. Helps of the Topic • ?read.delim – # Access a function's help file • ??base::delim – # Search for 'delim' in all help files for functions in 'base' • help.search("delimited") – # Search for 'delimited' in all help files • RSiteSearch("parsing text") – # Search for the term 'parsing text' on the R site.
  • 40. Sample Code of Chapter 1 • https://github.com/johnmyleswhite/ML_for_Hackers.git 4/23/2013 40Confidential | Copyright 2013 Trend Micro Inc.
  • 41. Reference & Resource 4/23/2013 41Confidential | Copyright 2012 Trend Micro Inc.
  • 42. Study Material • R in a nutshell 4/23/2013 42Confidential | Copyright 2013 Trend Micro Inc.
  • 43. Online Reference 4/23/2013 43Confidential | Copyright 2013 Trend Micro Inc.
  • 44. Community Resources for R help 4/23/2013 44Confidential | Copyright 2013 Trend Micro Inc.
  • 45. Resource • Websites – Stackoverflow – Cross Validated – R-help – R-devel – R-sig-* – Package-specific mailing list • Blog – R-bloggers • Twitter – https://twitter.com/#rstats • Quora – http://www.quora.com/R-software 4/23/2013 45Confidential | Copyright 2013 Trend Micro Inc.
  • 46. Resource (Con’d) • Conference – useR! – R in Finance – R in Insurance – Others – Joint Statistical Meetings – Royal Statistical Society Conference • Local User Group – http://blog.revolutionanalytics.com/local-r-groups.html • Taiwan R User Group – http://www.facebook.com/Tw.R.User – http://www.meetup.com/Taiwan-R/ 4/23/2013 46Confidential | Copyright 2013 Trend Micro Inc.
  • 47. Thank You! 4/23/2013 47Confidential | Copyright 2012 Trend Micro Inc.