Skip to Main Content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.
Welcome to R!
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.
The first step is to download R, which you can do here. I would also highly recommend downloading RStudio, the integrated development environment (IDE) for R. Both R and RStudio are free.
The Library also runs semi-regular R workshops. Check the Workshops page to learn more.
Introductory R tutorials
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 R
This is an official R manual. If you want to learn R technicalities top to bottom, this is the right place.
RStudio's online learning guide
RStudio 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 by
Publication Date: 2017-01-05
This 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.
Advanced R tutorials
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 by
Publication Date: 2017-03-13
Beginning 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 by
Publication Date: 2014-09-25
An 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 by
Publication Date: 2017-01-19
Providing 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 by
Publication Date: 2014-10-24
A 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 by
Publication Date: 2017-07-02
With 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.
R Markdown tutorials
R Markdown: The Definitive Guide by
Publication Date: 2018-10-01
R 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.