Currently, the Data Science curriculum does not include a class using R. However, R is increasingly popular in data science research and is often listed in job postings as a requirement or preference along with Python. So, for those interested in learning a little R to supplement their Python skills (or jump right into R!) these resources are here to help.

__Download R__

The first step is to download R, which you can do** here.** It is also recommended to download **RStudio**, the integrated development environment (IDE) for R. Both R and RStudio are free.

- R for Reproducible Scientific Analysis (Software Carpentry)This set of lessons from Software Carpentry is an introduction to R for people with no programming background. It introduces R, the RStudio interface, working with data structures, organizing/subsetting data, making plots, and creating reports. This is a great "get up to speed quickly" set of lessons that use the same data throughout.
- Programming with R (Software Carpentry)Also from Software Carpentry, this set of lessons is more focused on programming basics and best practices (functions, loops, conditionals, etc.).
- Introduction to RThis is an official R manual. If you want to learn R technicalities top to bottom, this is the right place.
- RStudio's online learning guideRStudio provides an extensive set of links to learning resources. From getting started with R, to making interactive plots with Shiny, to R code best practices, this page is definitely worth a look.

- R for Data Science byISBN: 9781491910399Publication Date: 2017-01-05This book introduces you to R, RStudio, and the tidyverse, a collection of R packages designed to work together to make data science fast, fluent, and fun. Suitable for readers with no previous programming experience.

We have quite a few R books available through the library. Some of these are only accessible via a physical book copy, but many are available as e-books. Try searching the library catalog **UC Library Search **for "R programming" to see our entire collection.

In the meantime, these books may be useful.

- Beginning Data Science in R byISBN: 9781484226704Publication Date: 2017-03-13Beginning Data Science in R details how data science is a combination of statistics, computational science, and machine learning. You'll see how to efficiently structure and mine data to extract useful patterns and build mathematical models. This book teaches you techniques for both data manipulation and visualization and shows you the best way for developing new software packages for R.
- Advanced R byISBN: 9781466586970Publication Date: 2014-09-25An Essential Reference for Intermediate and Advanced R Programmers. This book not only helps current R users become R programmers but also shows existing programmers what's special about R. Intermediate R programmers can dive deeper into R and learn new strategies for solving diverse problems while programmers from other languages can learn the details of R and understand why R works the way it does.
- Data Mining with R byISBN: 9781482234893Publication Date: 2017-01-19Providing an extensive update to the best-selling first edition, this new edition is divided into two parts. The first part will feature introductory material, including a new chapter that provides an introduction to data mining, to complement the already existing introduction to R. The second part includes case studies, and the new edition strongly revises the R code of the case studies making it more up-to-date with recent packages that have emerged in R. The book does not assume any prior knowledge about R.
- Automated Data Collection with R byISBN: 9781118834787Publication Date: 2014-10-24A hands on guide to web scraping and text mining for both beginners and experienced users of R Introduces fundamental concepts of the main architecture of the web and databases and covers HTTP, HTML, XML, JSON, SQL. Provides basic techniques to query web documents and data sets (XPath and regular expressions).
- Text Mining with R byISBN: 9781491981658Publication Date: 2017-07-02With this practical book, you'll explore text-mining techniques with tidytext, a package that authors Julia Silge and David Robinson developed using the tidy principles behind R packages like ggraph and dplyr. The authors demonstrate how treating text as data frames enables you to manipulate, summarize, and visualize characteristics of text. You'll also learn how to integrate natural language processing (NLP) into effective workflows.

One of the main benefits of R is the vast array of pre-existing packages (also called libraries) written by other R users and available for installation.

All official R packages are available through **CRAN** (Comprehensive R Archive Network). There are a *lot* of R packages available; this list of **recommended R packages** is a good starting point.

Here are some resources for popular data science-related R packages. Also be sure to check out all of RStudio's **cheatsheets**.

- dplyrdplyr is a package for data manipulation (data wrangling)

dplyr ebook tutorial

dplyr vignette

dplyr tutorial - tidyrtidyr is a package for making data into "tidy" data

tidy data and tidyr ebook tutorial

tidy rebook tutorial

tidyr vignette

tidyr tutorial with example - lubridatelubridate is a package for working with date-time data

lubridate ebook tutorial

lubridate cheat sheet - data.tabledata.table uses an "enhanced version of data.frame" to speed up manipulations and calculations

data.table vignette - ggplot2ggplot2 is the most popular and widely used data visualization library for R

ggplot2 tutorial

ggplot2 tutorial and example

ggplot2 cheat sheet

R Graph Gallery

ggplot2 extensions gallery

plotting extensions (ggplot2 and others) - ShinyShiny is a package for creating interactive graphics

Shiny examples gallery

Shiny tutorial

Shiny cheat sheet

- Introduction to R MarkdownA set of lessons from RStudio walking through R Markdown.
- Getting started with R Markdown tutorialThis tutorial from Coding Club at the University of Edinburgh provides a quick overview of what R Markdown is all about, and how to use it.
- R Markdown for reportsFor those who want to dig deeper, this tutorial covers code chunk modifiers, image adjustments, LaTeX, and more.
- R Markdown reference guideAn "at a glance" reference guide for R Markdown syntax from RStudio.
- R Markdown cheat sheetA thorough R markdown cheat sheet from RStudio.

- R Markdown: The Definitive Guide byISBN: 9780429782978Publication Date: 2018-10-01R Markdown: The Definitive Guide is the first official book authored by the core R Markdown developers that provides a comprehensive and accurate reference to the R Markdown ecosystem. With R Markdown, you can easily create reproducible data analysis reports, presentations, dashboards, interactive applications, books, dissertations, websites, and journal articles, while enjoying the simplicity of Markdown and the great power of R and other languages.