Short presentation delivered during CERN IT Lightning Talks Session with quick introduction to R programming language and its visualisation capabilities.
1 of 29
Download to read offline
More Related Content
Extend Your Toolbox with R
1. Extend your toolbox with
Szymon Skorupinski
CERN IT Lightning Talks Session
2nd October 2015
R
2. R is...
? Open source version of S ;)
? Programming language
? Computing environment
? Designed especially for data
? analysis
? manipulation
? visualization
3. Example data set
? From UBS Prices & Earnings 2015 report
? Working hours required to buy iPhone 6 for 70 cities
Year;City;Name;What;Hours
2015;Amsterdam;Working time required to buy..;1 iPhone 6 16 GB, in hrs.;49,75
2015;Athens;Working time required to buy..;1 iPhone 6 16 GB, in hrs.;98,21
2015;Auckland;Working time required to buy..;1 iPhone 6 16 GB, in hrs.;44,62
2015;Bangkok;Working time required to buy..;1 iPhone 6 16 GB, in hrs.;149,57
2015;Barcelona;Working time required to buy..;1 iPhone 6 16 GB, in hrs.;59,06
2015;Beijing;Working time required to buy..;1 iPhone 6 16 GB, in hrs.;217,8
()
4. Example data set
? From UBS Prices & Earnings 2015 report
? Working hours required to buy iPhone 6 for 70 cities
Year;City;Name;What;Hours
2015;Amsterdam;Working time required to buy..;1 iPhone 6 16 GB, in hrs.;49,75
2015;Athens;Working time required to buy..;1 iPhone 6 16 GB, in hrs.;98,21
2015;Auckland;Working time required to buy..;1 iPhone 6 16 GB, in hrs.;44,62
2015;Bangkok;Working time required to buy..;1 iPhone 6 16 GB, in hrs.;149,57
2015;Barcelona;Working time required to buy..;1 iPhone 6 16 GB, in hrs.;59,06
2015;Beijing;Working time required to buy..;1 iPhone 6 16 GB, in hrs.;217,8
()
5. Reading data
data <- read.csv2("data.csv")
hours <- data$Hours
names(hours) <- data$City
17. and other minor changes
barplot(
hours,
las = 2,
horiz = TRUE,
col = rainbow(length(hours)),
axis.lty = 1,
main = "Working time to buy
iPhone 6 - in hours")
27. This is only tip of the iceberg
? Of R graphics
? Quickly create publication ready graphs
? Only base package shown today
? Many others available, e.g.: lattice, ggplot2
? Of other vast R capabilities
? Statistics, analytics, machine learning etc.
? Extensible by over 7000 packages
? https://cran.r-project.org/web/packages
28. Try it!
? R - https://cran.r-project.org
? IDE for R - https://www.rstudio.com
? MOOC, e.g.
? R Programming on Coursera
? Interactive tutorial about R on R
? http://swirlstats.com
? Without installing anything C in your browser
? https://www.datacamp.com/swirl-r-tutorial