• You Can Learn R
  • Preface
    • 0.1 Why did I create this resource?
    • 0.2 Who is this for?
    • 0.3 About the Resources
  • 1 An introductory seminar
    • 1.1 R: What, why, and how?
      • 1.1.1 What is R? What is RStudio/ Posit Cloud?
      • 1.1.2 Why use R?
      • 1.1.3 Why use RStudio or Posit Cloud?
      • 1.1.4 How R works
      • 1.1.5 How to get started with R
    • 1.2 How to learn R
    • 1.3 When things go wrong
  • 2 Resources for learning R
    • 2.1 Overview of resources
    • 2.2 Recommended packages
      • 2.2.1 Tidyverse
      • 2.2.2 Reporting Results
    • 2.3 Recommended learning resources
      • 2.3.1 Written Materials
      • 2.3.2 Interactive Tutorials
      • 2.3.3 Data Sources
      • 2.3.4 Sites to search
    • 2.4 Find your R learning community
      • 2.4.1 Global Communities
      • 2.4.2 Communities for under-represented R user groups
    • 2.5 Cheat sheets for quick reference
      • 2.5.1 Recommended Cheat Sheets
      • 2.5.2 Full list of cheat sheets:
  • 3 Accessibility Recommendations
    • 3.1 Tips for limited internet access
    • 3.2 Translated materials
    • 3.3 Blind R users
  • Published with bookdown

You Can Learn R

2.2 Recommended packages

2.2.1 Tidyverse

The tidyverse is an opinionated collection of R packages designed for data science. All packages share an underlying design philosophy, grammar, and data structures. Installing the tidyverse will install all tidyverse packages. To see a full list of tidyverse packages, see https://www.tidyverse.org/packages/

Core tidyverse - Loading the tidyverse using library(tidyverse) will load 8 core packages from the tidyverse that you are likely to use in everyday data analyses. These packages are:

  • ggplot2 - ggplot2 is a system for creating graphics, based on The Grammar of Graphics (gg). ggplot2 is a powerful tool for visualizing data.

  • dplyr - dplyr provides a grammar of data manipulation, providing a consistent set of verbs that solve the most common data manipulation challenges. These include select, filter, mutate, summarize, etc.

  • tidyr - tidyr provides a set of functions that help you get to tidy data. Tidy data is data with a consistent form where every variable goes in a column and every observation is a row.

  • readr - readr provides a fast and friendly way to read rectangular data (like csv, tsv, and fwf). It is designed to flexibly parse many types of data.

  • tibble - tibble provides opinionated data frames that make working in the tidyverse a little easier.

  • stringr - stringr provides a cohesive set of functions designed to make working with strings as easy as possible.

  • forcats - forcats provides a suite of useful tools that solve common problems with factors, which R uses to handle categorical variables.

  • purrr - purrr enhances R’s functional programming toolkit by providing a complete and consistent set of tools for working with functions and vectors. Once you master the basic concepts, purrr allows you to replace many for loops with code that is ieasier to write and more expressive

2.2.2 Reporting Results

  • R Markdown - R Markdown allows for reproducible reports that contain R code. R Markdown is integrated into RStudio.

  • shiny - shiny is used to make interactive web apps with R in order to explore data and share findings.