Session 1 of Introduction to R for Data Science, Data Science Serbia in cooperation with Startit, Belgrade, lecturers: ing Branko Kovač and dr Goran S. Milovanović
1. Introduction to R for Data Science
Lecturers
dipl. ing Branko Kovač
Data Analyst at CUBE/Data Science Mentor
at Springboard
Institut za savremene nauke
Data Science zajednica Srbije
branko.kovac@gmail.com
dr Goran S. Milovanović
Data Scientist at DiploFoundation
Data Science zajednica Srbije
goran.s.milovanovic@gmail.com
goranm@diplomacy.edu
2. Step 1
• Install R
• Install RStudio IDE
Windows
• R installation: https://cran.r-project.org/bin/windows/base/
• RStudio installation: https://www.rstudio.com/products/rstudio/download/
Ubuntu (14.04.1-3 and similar…)
• R installation: https://www.digitalocean.com/community/tutorials/how-to-set-up-r-on-
ubuntu-14-04
• Rstudio installation: https://www.rstudio.com/products/rstudio/download/
Intro to R for Data Science
Session 1: Getting to know R
3. Intro to R for Data Science
Session 1: Getting to know R
Step 2
• Get to know your RStudio IDE…
4. Intro to R for Data Science
Session 1: Getting to know R
5. Step 4
• Introducing the R ecosystem…
• RStudio: Tools -> Install Packages
Image source: The network structure of R packages on CRAN and BioConductor, Andrie de Vries & Joseph Rickert, Microsoft.
Intro to R for Data Science
Session 1: Getting to know R
6. CRAN: The Comprehensive R Archive Network
Intro to R for Data Science
Session 1: Getting to know R
7. Step 4
• Install something really useful, like:
> install.packages(“ggplot2”);
• NOTE: not all R packages are installed in this way; during the
course we will learn about different installation approaches.
> installed.packages() # alternative: > library()
> .libPaths()
> library(ggplot2);
search(); # what is in the environment
> old.packages(); # what is old?
> update.packages(); # update everything (carefully!)
Intro to R for Data Science
Session 1: Getting to know R
8. Step 5
• Getting to know R!
• Session 1 Script: IntroR_Session1.R
• Data Set: rko_film_1930-1941.csv
# data source:
# http://www.stat.ufl.edu/~winner/datasets.html
# an adaptation of the original .dat file
Intro to R for Data Science
Session 1: Getting to know R
9. Step 6
• Readings for Session 2:
• The Art of R Programming, Norman Matloff, September 1, 2009:
http://heather.cs.ucdavis.edu/~matloff/132/NSPpart.pdf
Chapters 1 - 5
• Very useful:
• Inside R: http://www.inside-r.org/
• Quick R: http://www.statmethods.net/
• R-bloggers: http://www.r-bloggers.com/
Intro to R for Data Science
Session 1: Getting to know R