Introduction to R and RStudio

Stephen Roecker, Skye Wills, Katey Yoast and Tom D’Avello

2021-02-01

Outline

  1. Course Overview
    1. Review Course Objectives
    2. Why is this training needed?
    3. Why is course organized this way?
  2. What is R?
    1. Why should I use R?
    2. What can R do?
  3. How do I get started?
    1. RStudio interface
    2. What are packages?
    3. How to navigate the Help tab
    4. How to save files
  4. Manipulating data
    1. Loading & viewing data
    2. Filtering, transforming, merging, aggregating and reshaping data
    3. Exporting data

Course Objectives

Why is this training needed?

Why is course organized this way?

What is R? - Open Source Project

  1. a software environment: statistics, graphics, programming, calculator, GIS, etc…

  2. a language: vocabulary to explore, summarize, and model data

What is R? - “One Tool”"

ODBC and GDAL link R to nearly all possible formats/interfaces

Why should I use R? - 3 Reasons!

  1. Cost. R is free! “Free as in free speech, not free beer”!

  2. Reproducible Research (self-documenting, repeatable)

    • repeatable:
      • code + output in a single document (‘I want the right answer, not a quick answer’ - Paul Finnell)
      • easier the next time (humorous example)
      • numerous Excel horror stories of scientific studies gone wrong exist (TED Talk)
    • scalable: applicable to small or large problems
  3. R in a Community

  4. Learning Resources (quantity and quality)

  5. R is ‘becoming’ the new norm (paradigm shift?). “If we don’t accept these challenges, other who are less qualified will; and soil scientists will be displaced by apathy.” (Arnold and Wilding, 1992)

What can R do? - Packages

What can R do? - Create Maps

What can R do? - Draw Soil Profiles

What can R do? - Draw Depth Plots