SlideShare a Scribd company logo
1 of 20
1
Up your data game: How to use R to wrangle,
analyze, and visualize data faster and better
MERL Tech DC 2018
Charles Guedenet, MEL Technical Advisor, IREX
Jonathan Seiden, Learning Research Specialist, Save the Children
Please: Plug in your laptop and check its wifi
download your dataset and r files here: http://bit.ly/merl-r
2
Objectives
By the end of this session, you should:
1. Have R and Rstudio setup on your computer
2. Have a better understanding of what R programming is
and what it can do for you
3. Learn about useful R tools (functions and packages)
that you can use in your own work
4. Feel intrigued (and excited?) enough about R to pursue
further learning
3
What is R?
A programming language for data manipulation
Command-line driven vs. Not point-and-click
Who uses it?
• Academics, journalists, statisticians, open data enthusiasts
4
Who uses R?
5
Pro #1: a reproducible workflow!
6
Pro #2: top notch data visualization!
https://www.r-graph-gallery.com/
7
Pro #3: Flexible & Comprehensive
Work with data across the data life cycle
Get data Cleaning Analysis Data viz Reporting
8
Pro #4: Large & active community
 Tutorials, blogs, websites
R-bloggers.com – news and tutorials by 750+ bloggers
Stats.stackexchange.com
 So much free code! Copy + paste
Kaggle.com
Github.com
 A package for everything - +13k packages
www.r-pkg.org
9
Pro #5: It’s free!
Compare with: ANNUAL Cost
SPSS $1,200 (statistics only) + $$ for addons
SAS $8,700 first year (basic Analytics Pro)
STATA $595 - $1,500
10
Con #1: Steep learning curve
11
Pros and Cons
 Programming language =
reproducible work & huge
efficiency gains
 Top notch data visualization
capabilities
 Flexible & comprehensive
 Active R community
 Free and open source
 A steep learning curve for
programming newbies
 Colleagues/friends may still
prefer STATA SPSS users
Pros Cons
12
Getting setup
1. Install R on your computer
http://lib.stat.cmu.edu/R/CRAN/
Windows or MacOS - choose one of the precompiled
binary distributions (i.e., ready-to-run applications)
linked at the top of the R Project’s webpage.
2. Install RStudio
https://www.rstudio.com/products/rstudio/download/
13
Introduction to Rstudio
Go to your Start menu and in programs start Rstudio by clicking
on the Rstudio icon
14
Rstudio basics
This is what the Rstudio interface looks like
15
Rstudio basics: the console
16
Introduction to Rstudio: Source tabs
This is a built-in text editor
Open an empty script File  New File  R Script
You can write a script and then execute it in the console using Ctrl Shift Enter
17
Global Environment & History
Environment tab - where you can see the values and functions that you’ve
created or imported
History tab –where you can see a list of key strokes you’ve entered in console
18
Files, plots, packages, help
Files – navigate your computer’s files
Packages – find and install packages
Help – search and find help with functions and packages
19
Files, plots, packages, help
A function is a set of statements (or instructions) organized to
perform a specific task.
e.g. sqrt(), sd(), mean()
Packages are collections of R functions, data, and compiled
code in a well-defined format.
The library is where packages are storied on your computer.
20
Basic tips
1. To run a command/function, click the “Run” button or press Ctrl +
Enter
2. R is case sensitive. Make sure your spelling and capitalization are
correct.
3. The $ symbol is used to select a particular column within a table
(e.g., table$column).
4. The # symbol: Any text that you do not want R to act on (such as
comments, notes, or instructions) needs to be preceded by
the # symbol (a.k.a. hash-tag, comment, pound, or number symbol). R
ignores the remainder of the script line following #.
From <http://ncss-tech.github.io/stats_for_soil_survey/chapters/1_introduction/1_introduction.html>

More Related Content

Similar to R to wrangle, analyze, and visualize data faster and better

R studio practical file
R studio  practical file R studio  practical file
R studio practical file Ketan Khaira
 
SessionOne_KnowingRandRStudio
SessionOne_KnowingRandRStudioSessionOne_KnowingRandRStudio
SessionOne_KnowingRandRStudioHellen Gakuruh
 
Financial Risk Mgt - Lec 4 by Dr. Syed Muhammad Ali Tirmizi
Financial Risk Mgt - Lec 4 by Dr. Syed Muhammad Ali TirmiziFinancial Risk Mgt - Lec 4 by Dr. Syed Muhammad Ali Tirmizi
Financial Risk Mgt - Lec 4 by Dr. Syed Muhammad Ali TirmiziDr. Muhammad Ali Tirmizi., Ph.D.
 
Big data Big Analytics
Big data Big AnalyticsBig data Big Analytics
Big data Big AnalyticsAjay Ohri
 
Reproducible Research in R and R Studio
Reproducible Research in R and R StudioReproducible Research in R and R Studio
Reproducible Research in R and R StudioSusan Johnston
 
Twitter analysis by Kaify Rais
Twitter analysis by Kaify RaisTwitter analysis by Kaify Rais
Twitter analysis by Kaify RaisAjay Ohri
 
Study of R Programming
Study of R ProgrammingStudy of R Programming
Study of R ProgrammingIRJET Journal
 
A Gentle Introduction to Tidy Statistics in R.pdf
A Gentle Introduction to Tidy Statistics in R.pdfA Gentle Introduction to Tidy Statistics in R.pdf
A Gentle Introduction to Tidy Statistics in R.pdfVickyAlers
 
GET STARTED WITH R FOR DATA SCIENCE
GET STARTED WITH R FOR DATA SCIENCEGET STARTED WITH R FOR DATA SCIENCE
GET STARTED WITH R FOR DATA SCIENCEUSDSI
 
Best corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbaiBest corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbaiUnmesh Baile
 
A Handbook Of Statistical Analyses Using R
A Handbook Of Statistical Analyses Using RA Handbook Of Statistical Analyses Using R
A Handbook Of Statistical Analyses Using RNicole Adams
 
R programming for psychometrics
R programming for psychometricsR programming for psychometrics
R programming for psychometricsDiane Talley
 

Similar to R to wrangle, analyze, and visualize data faster and better (20)

R studio practical file
R studio  practical file R studio  practical file
R studio practical file
 
SessionOne_KnowingRandRStudio
SessionOne_KnowingRandRStudioSessionOne_KnowingRandRStudio
SessionOne_KnowingRandRStudio
 
Poly_introduction_R.pdf
Poly_introduction_R.pdfPoly_introduction_R.pdf
Poly_introduction_R.pdf
 
R programming
R programmingR programming
R programming
 
Financial Risk Mgt - Lec 4 by Dr. Syed Muhammad Ali Tirmizi
Financial Risk Mgt - Lec 4 by Dr. Syed Muhammad Ali TirmiziFinancial Risk Mgt - Lec 4 by Dr. Syed Muhammad Ali Tirmizi
Financial Risk Mgt - Lec 4 by Dr. Syed Muhammad Ali Tirmizi
 
Toolboxes for data scientists
Toolboxes for data scientistsToolboxes for data scientists
Toolboxes for data scientists
 
R presentation
R presentationR presentation
R presentation
 
Better graphics in R
Better graphics in RBetter graphics in R
Better graphics in R
 
Big data Big Analytics
Big data Big AnalyticsBig data Big Analytics
Big data Big Analytics
 
Reproducible Research in R and R Studio
Reproducible Research in R and R StudioReproducible Research in R and R Studio
Reproducible Research in R and R Studio
 
Twitter analysis by Kaify Rais
Twitter analysis by Kaify RaisTwitter analysis by Kaify Rais
Twitter analysis by Kaify Rais
 
Study of R Programming
Study of R ProgrammingStudy of R Programming
Study of R Programming
 
A Gentle Introduction to Tidy Statistics in R.pdf
A Gentle Introduction to Tidy Statistics in R.pdfA Gentle Introduction to Tidy Statistics in R.pdf
A Gentle Introduction to Tidy Statistics in R.pdf
 
GET STARTED WITH R FOR DATA SCIENCE
GET STARTED WITH R FOR DATA SCIENCEGET STARTED WITH R FOR DATA SCIENCE
GET STARTED WITH R FOR DATA SCIENCE
 
Getting Started with Python
Getting Started with PythonGetting Started with Python
Getting Started with Python
 
Software
SoftwareSoftware
Software
 
Best corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbaiBest corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbai
 
A Handbook Of Statistical Analyses Using R
A Handbook Of Statistical Analyses Using RA Handbook Of Statistical Analyses Using R
A Handbook Of Statistical Analyses Using R
 
tools
toolstools
tools
 
R programming for psychometrics
R programming for psychometricsR programming for psychometrics
R programming for psychometrics
 

Recently uploaded

Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...shivangimorya083
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...amitlee9823
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...shambhavirathore45
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...amitlee9823
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxolyaivanovalion
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 

Recently uploaded (20)

Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptx
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 

R to wrangle, analyze, and visualize data faster and better

  • 1. 1 Up your data game: How to use R to wrangle, analyze, and visualize data faster and better MERL Tech DC 2018 Charles Guedenet, MEL Technical Advisor, IREX Jonathan Seiden, Learning Research Specialist, Save the Children Please: Plug in your laptop and check its wifi download your dataset and r files here: http://bit.ly/merl-r
  • 2. 2 Objectives By the end of this session, you should: 1. Have R and Rstudio setup on your computer 2. Have a better understanding of what R programming is and what it can do for you 3. Learn about useful R tools (functions and packages) that you can use in your own work 4. Feel intrigued (and excited?) enough about R to pursue further learning
  • 3. 3 What is R? A programming language for data manipulation Command-line driven vs. Not point-and-click Who uses it? • Academics, journalists, statisticians, open data enthusiasts
  • 5. 5 Pro #1: a reproducible workflow!
  • 6. 6 Pro #2: top notch data visualization! https://www.r-graph-gallery.com/
  • 7. 7 Pro #3: Flexible & Comprehensive Work with data across the data life cycle Get data Cleaning Analysis Data viz Reporting
  • 8. 8 Pro #4: Large & active community  Tutorials, blogs, websites R-bloggers.com – news and tutorials by 750+ bloggers Stats.stackexchange.com  So much free code! Copy + paste Kaggle.com Github.com  A package for everything - +13k packages www.r-pkg.org
  • 9. 9 Pro #5: It’s free! Compare with: ANNUAL Cost SPSS $1,200 (statistics only) + $$ for addons SAS $8,700 first year (basic Analytics Pro) STATA $595 - $1,500
  • 10. 10 Con #1: Steep learning curve
  • 11. 11 Pros and Cons  Programming language = reproducible work & huge efficiency gains  Top notch data visualization capabilities  Flexible & comprehensive  Active R community  Free and open source  A steep learning curve for programming newbies  Colleagues/friends may still prefer STATA SPSS users Pros Cons
  • 12. 12 Getting setup 1. Install R on your computer http://lib.stat.cmu.edu/R/CRAN/ Windows or MacOS - choose one of the precompiled binary distributions (i.e., ready-to-run applications) linked at the top of the R Project’s webpage. 2. Install RStudio https://www.rstudio.com/products/rstudio/download/
  • 13. 13 Introduction to Rstudio Go to your Start menu and in programs start Rstudio by clicking on the Rstudio icon
  • 14. 14 Rstudio basics This is what the Rstudio interface looks like
  • 16. 16 Introduction to Rstudio: Source tabs This is a built-in text editor Open an empty script File  New File  R Script You can write a script and then execute it in the console using Ctrl Shift Enter
  • 17. 17 Global Environment & History Environment tab - where you can see the values and functions that you’ve created or imported History tab –where you can see a list of key strokes you’ve entered in console
  • 18. 18 Files, plots, packages, help Files – navigate your computer’s files Packages – find and install packages Help – search and find help with functions and packages
  • 19. 19 Files, plots, packages, help A function is a set of statements (or instructions) organized to perform a specific task. e.g. sqrt(), sd(), mean() Packages are collections of R functions, data, and compiled code in a well-defined format. The library is where packages are storied on your computer.
  • 20. 20 Basic tips 1. To run a command/function, click the “Run” button or press Ctrl + Enter 2. R is case sensitive. Make sure your spelling and capitalization are correct. 3. The $ symbol is used to select a particular column within a table (e.g., table$column). 4. The # symbol: Any text that you do not want R to act on (such as comments, notes, or instructions) needs to be preceded by the # symbol (a.k.a. hash-tag, comment, pound, or number symbol). R ignores the remainder of the script line following #. From <http://ncss-tech.github.io/stats_for_soil_survey/chapters/1_introduction/1_introduction.html>

Editor's Notes

  1. Intro: R programming language is one of the most popular languages to do data science, used by tons of companies and universities around the globe in all sorts of fields. *The name “R” comes from the initials of the two men who first developed the language at the University of Auckland, Robert Gentleman and Ross Ihaka
  2. Image from https://www.quora.com/Who-even-uses-R-language . (James McInnes) Intro: R programming language is one of the most popular languages to do data science, used by tons of companies and universities around the globe in all sorts of fields. Who uses it and to do what? Why learn R and how does it compare to other programs like Excel, STATA, SPSS, and others? Ford uses R to improve the design of its vehicles. Basically, Twitter uses R to monitor user experience. The US National Weather Service uses R to predict severe flooding. The Human Rights Data Analysis Group uses R to quantify the impact of war. R is being used by The New York Times to create infographics. Google uses R to calculate the ROI of advertising campaigns
  3. 1. R is an actual programming language, with a command-line interface for executing code versus point-and-click Efficiency gains – Useful if you need to reformat every graph or chart at once OR If your data changes after already making your calculations Reproducible - Just like creating a recipe for a meal, a recipe with code makes it possible for anyone to reproduce your work (including your future self). Every step of your analysis is recorded. (It's also useful for validating with other researchers).
  4. https://www.r-graph-gallery.com/
  5. Obtain and reads virtually any type of data – Excel, web scraping, databases (MySQL), foreign (SPSS, SAS) Cleaning and wrangling Analysis – Quant, Qualitative, network analysis, Machine learning, Text mining Data visualization Reporting – publish static results in Word or pdf or make it interactive with rmarkdown and Shiny packages
  6. https://www.r-bloggers.com/ https://cran.r-project.org/web/packages/available_packages_by_name.html 3. Active community It's easy to create so-called packages, which are extensions to R. R's very active community has created thousands of these packages for many different fields. Github.com and stats.stackexchange.com are full of freely available programming code
  7. PROS 1. R is an actual programming language, with a command-line interface for executing code versus point-and-click Efficiency gains – Useful if you need to reformat every graph or chart at once OR If your data changes after already making your calculations 2. Data visualization 3. Flexible & comprehensive - CONS Steep learning curve Resistance from colleagues/friends
  8. Setup If you are running Windows or MacOS, you should choose one of the precompiled binary distributions (i.e., ready-to-run applications) linked at the top of the R Project’s webpage.   Rstudio R Studio is an “Integrated Development Environment”, or IDE. This means it is a front-end for R that makes it much easier to work with. R Studio is also free, and available for Windows, Mac, and Linux platforms.
  9. Rstudio is a particularly user-friendly interface for working with R. It has drop-down menus and many customization options. **The first time you open Rstuio, you’ll see three windows. By default, a fourth window is hidden. Open it by clicking on the File drop-down menu, then New file, and R Script.
  10. The Console is where you can type code and execute. It’s also where you warnings and error messages appear to help you with debugging your code
  11. The benefits are writing code in a script is that your work is saved and can be changed later if, for example, your data changes, you want to make edits to your charts, or you want to share your work with others.
  12. Almost everything in R is done through functions. A function is a set of statements organized together to perform a specific task. R has a large number of in-built functions and the user can create their own functions. Functions may include arguments to help the function accomplish a task. (for example, do not include NA values) Numeric functions Sqrt() Character functions e.g. strsplit(data, split)
  13. From <http://ncss-tech.github.io/stats_for_soil_survey/chapters/1_introduction/1_introduction.html>