| University Libraries

See Updates and FAQs for the latest library services updates. Subject Librarians are available for online appointments, and Virtual Reference has extended hours.

Resources to learn and use the Open Source Statistical software R (R-Project)

- Start Here
- General Tutorials
- Statistical Analysis
- Data Management
- Graphics
- Data Science
- Special Topics
- Good Practices
- Get Help

Research Consultant

The R Project for Statistical Computing is a **free**, open source **statistical computing language** that is popular among researchers in many fields.

The learning curve for true understanding is steep, but specific tasks (e.g., importing files from other statistical software) are often quite easy because of packages that can be created by anybody. R undergoes **rapid development** and improvement. Tutorials even a year old may be **out of date**.

Note that **RStudio **is currently in the process of changing names to **Posit.** Various tutorials may reference one or the other, but both are acceptable at this time.

- R for
**Data Management** - R for
**Statistical Analysis** - R for
**Data Visualization**

See the slides from our Getting Started with R (pdf) workshop for an overview and recommendations.

No installations needed; runs in your web browser.

- RStudio Cloud Primers - Videos and try-it-yourself examples from the very basics
**Programming Basics**- functions/packages, arguments, objects, data types and structures- Data basics - more on dataframes (+tibbles), and data types

**The Tidyverse**- a group of packages for data management

The following 3 primers in Work with Data**Working with Tibbles**- tibbles, overview of the tidyverse package- Isolating Data with dplyr - the functions select, filter, arrange, and the pipe ($>$)
- More on filter

- Deriving Information with dplyr - the functions summarize, group_by, and mutate

- a longer alternative to #2 & #3

- Visualization with ggplot2 (8 tutorials) - various chart and plot types
- the single primer Visualization Basics requires no prior knowledge, great for building motivation.

**Set Up**- extra help to install R, RStudio, and Packages on your own computer- R Portable (SourceForge)

- Data Science with R and RStudio (UQ Library)
- R with RStudio: Getting Started (~1.5 hrs): Covers the basics of starting and organizing a process, opening a data file and doing basic data management and visualization. Markdown document with the code
- R data manipulation with RStudio and dplyr (~1hr): covers the basics of dplyr and the tidyverse.

- R for Data Science by Garrett Grolemund; Hadley Wickham Learn how to use R to turn raw data into insight, knowledge, and understanding. 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, R for Data Science is designed to get you doing data science as quickly as possible. Authors Hadley Wickham and Garrett Grolemund guide you through the steps of importing, wrangling, exploring, and modeling your data and communicating the results. You'll get a complete, big-picture understanding of the data science cycle, along with basic tools you need to manage the details. Each section of the book is paired with exercises to help you practice what you've learned along the way. You'll learn how to: Wrangle--transform your datasets into a form convenient for analysis Program--learn powerful R tools for solving data problems with greater clarity and ease Explore--examine your data, generate hypotheses, and quickly test them Model--provide a low-dimensional summary that captures true "signals" in your dataset Communicate--learn R Markdown for integrating prose, code, and resultsCall Number: Available Online; Non-circulating copy in the DiSC labISBN: 9781491910399Publication Date: 2017-01-05

See also R for Data Science: Exercise Solutions by Jeffrey B. Arnold

- Overview
- General Tutorials
- Statistical Analysis - See materials for teaching and learning statistics with R
- Data Management - Go here for packages and tutorials on preparing data
- Graphics - R excels at making graphics, see the many options and galleries
- R Programming - Links for programmers who want to know R well
- Good Practices
- Get Help - Need more help? See your options

- Why The R Programming Language Is Good For Business (FastCompany)
- Choosing R or Python for Data Analysis (DataCamp) - From 2015, but still useful
- Where should I start - R or Python? (SAGE campus)
- Python can be better for general tasks, plus data collection and machine learning
- R can be better for analysis, like network analysis and statistics, and visualization

- If you know other
**programing**languages,**Python**will likely be easier to start with. - If you
*instead*are familiar with**statistical**software,**R**will likely be easier to start with. - If you are just starting out,
- Pick
**R**If you will mostly work with**data tables**and be in an**academic**context - Pick
**Python**if you will work with**text**or**websites**and/or be in a**business**context

- Pick

Many people will ultimately learn both. But, they are similar enough that you do not want to learn them at the same time--it can get confusing to switch back and forth. Knowing either one will help you learn the other. So, just pick one and get started!

If you already know another statistical software or programming language, you might try these first.

- R language for programmers by John D. Cook
- MATLAB, NumPY, Julia and R Side-by-side reference sheet - Hyperpolyglot
- Python → R: Introduction to R
- MATLAB → R: MATLAB® / R Reference, by David Hiebeler
- Stata → R: R for Stata Users (Uses R-Commander. Useful glossary/comparison of codes , p. 497)
- Data manipulation in R for Stata users - (Quick reference guide)
- Getting Started in R/Stata pdf (side-by-side tutorial)

- Excel → R:
- R For Excel Users Tutorials & Book by John Taveras
- Video: R for Excel Users LinkedIn Learning

- Last Updated: May 22, 2023 1:13 PM
- URL: https://infoguides.gmu.edu/learn_r
- Print Page

**Ask a Librarian | Hours & Directions | Mason Libraries Home**

Copyright © George Mason University