Chapter 1 General Information

1.1 Prerequisites

  • Basics in file management and familiarity with data sheets (in Microsoft Excel, Google sheets, etc.)

1.2 Learning objective


  • Be able to navigate R Studio and write reproducible code.
  • Execute lines of code, as well as complete scripts.
  • Identify variables, functions, and operators.
  • Approach basic troubleshooting.
  • Know how to download biodiversity data using Application Programming Interfacen (API).

1.3 Introduction

Students will learn R basics while downloading biodiversity data from multiple data repositories. This module will walk students through installing R, navigating R,writing reproducible scripts in R, and using R to download biodiversity data.

1.4 Why R?

Graph of R ratings overtime, rating is based on commonly used search engines, (x-axis is year, y-axis is rating (%)) shows the rating of R increasing over time.

  • R is a popular scripting language with readily available jobs (see jobs here: r-users.com)

  • R allows for reproducibility

    • Every step is documented by each line of code in an analysis.
  • R is free and open access

    • there is no associated cost 💲
    • lots of community support for writing and troubleshooting code (ex. Overflow)
  • R is interdisciplinary

  • R can create beautiful figures

1.5 References

There are a lot of online resources for learning R. Throughout this activity we reference additional resources that may be useful. Below, we summarize the cited resources, as well as some additional references. We used many of these resources to create this activity.

General

  • R Ecology Lesson

    • Introduction chapters for data carpentry ecology.
  • RStudio Education

    • Resources for beginners by the creators of R Studio.
  • R-bloggers

    • R news and tutorials by hundreds of R bloggers.
  • R for cats and cat lovers

    • A cat🐱-oriented way to learn R basics.
  • R for Biologist NIMBioS

    • An introduction to R and descriptive statistics 📊.
  • RYouWithMe

    • Made by R-ladies Sydney. Fun tutorials on R basics, data cleaning, data visualization, and R markdowns.
  • The Carpentries

    • “The Carpentries teaches foundational coding, and data science skills to researchers worldwide.” This organization hosts workshops and makes its lesson plans available freely for self-learning and reuse. Main lessons are divided into…"
  • R for Data Science

    • “R for Data Science” textbook.
  • Twitter for R programmers

    • Learn how to connect with the R community over twitter.

Tidyverse

Tidyverse is a must-have suite of packages (defined in section 3.3) for data wrangling and analysis that includes many packages. Important :

  • dplyr

    • data manipulation and management
  • tidyr

    • tidying your data
  • ggplot2

    • data visualization