On this page
What is R?
R is a free, open-source programming language primarily for statistics and graphics. It's been gaining popularity rapidly across a variety of disciplines.
For a fuller description of R, see What is R? from the R Project.
Why use R?
R promotes reproducibility
With R, it is easier to document, reuse, and reproduce all the steps of your statistical analysis, compared to other statistical packages. Not only do you make your own work more effective and efficient, but also make your data analysis replicable and transparent to other researchers and the public.
R is more hands-on and facilitates learning
GUI(Graphical User Interface) statistical packages offer point-and-click operations that ease your learning, but they might also blind you to underlying mechanism of your analysis.
By contrast, R gives you the opportunity to code by hand, enabling you to understand the fundamentals of operations, which in turn facilitates your future learning.
R connects you to a pipeline of new packages
Packages are collections of R functions, data and code written by a very activity community of R users. Packages can help you solve your specific data issues more effectively -- and there are currently thousands of R packages for download, with more new packages on the way to expand what you can do with R. (And these packages are free too!)
R has robust online documentation and an active user community
R's Help pages include extensive documentation. There is also a large and enthusiastic community eager to help you out.
R is free
You can install it on every computer you use.
How does R compare to other statistical packages?
R is open source -- a benefit for those who don’t have the budget for proprietary programs like SPSS.
R has a steep learning curve and while it may take a while to become proficient, you can learn R incrementally.
Want to know more about how R has been gaining popularity in academia and industry? Read this article The Popularity of Data Science Software by data scientist Robert Muenchen on comparison between R and other statistical packages.
Downloads and installation
F Windows, Mac OS X, and Linux for free from CRAN (Comprehensive R Archive Network).
An integrated development environment (IDE) for R. It provides a user-friendly interface for R with features to make working with R easier. It is also open source and free to download. Note: You don’t need RStudio to do analysis with R, but you must have R before you can use RStudio.
Help with downloads and installation
R Installing, Customizing, and Updating (UCLA)
Information to help you install R, customize it, and keep it up to date, maintained by UCLA's Institute for Digital Research & Education.
FAQ and HOWTO Documents
Answers to questions about download, installation, and licence terms, covering Linux, Mac, Unix, and Windows.
Tutorials and guides for beginners and beyond
Access LinkedIn Learning via the SFU Library -- an excellent source of tutorials on R catering to users at different levels of expertise on a variety of topics.
For example, "Learning R" will help get you to up and running on R with a variety of elementary tasks such as modifying data, charts and graphs.
You can also view lessons on more specific topics, such as data manipulation, data visualization, and switching from SAS/Excel to R..
Other R resources
A few recommended resources to get you started:
How to Learn R
A learning path charted to help you learn R step by step to build up your confidence and competency.
R Learning Resources by UCLA
Institute for Digital Research and Education (IDRE) at UCLA has brought together guides and tutorials on various topics such as reading data to R, subsetting data, and step-by-step instructions to analyze major public-use survey data sets with R by Anthony Damico.
Free Introduction to R Programming Online Course by DataCamp
An interactive course with a lot of exercises to help you master some basic concepts of R, including factors, lists and data frames.
Introduction to R for Data Science by edX
An introductory R course to help you grasp R language fundamentals and basic syntax and understand how R is used to perform data analysis.
Swirl: learn R, in R
"Swirl teaches you R programming and data science interactively, at your own pace, and right in the R console."
Resources for cleaning your data
A common challenge many beginners, and even experienced users of R, faces is how to clean and convert their data into format that allows for easy analysis. Potentially helpful resources include:
These courses could be particularly useful: "Data Wrangling in R", "Cleaning Bad Data in R", "Learning the R Tidyverse".
How to Learn R
The Data Manipulation section in this guide includes resources for dealing with messy data, including string, times and dates, and time series data.
These books at SFU library might be helpful:
- Data Wrangling in R
- Expert data wrangling with R: streamline your work with tidyr, dplyr, and ggvis
- Basic data analysis for time series with R [also available in print]
- Statistical data cleaning with applications in R [print]
Help and support: From R, the R community, and at the Library
R Help menu
RStudio and RGui Console both provide in-built access to the R Help pages: you can just choose the Help menu, or use the command help.start( ).
Two most important links on the Help page are Packages and Search Engine & Keywords, under the heading Reference.
The Search Engine link will take you to the R Help searching.
The Packages link will take you to a list of your installed R packages: click on a package and you will see a list of functions for the package.
A question-and-answer site used by programmers of all levels. It has a voting mechanism that pushes the most helpful answer to the top.
R-Help Mailing List
A huge archive of questions and answers about R.
Library help and support
R Workshops at the Library
The Research Commons offer R workshops on regular basis and on a wide range of topics. Check the Research Commons' Workshops Schedule to find one that suits your need!
A sample of past R workshops:
- Introduction to R (2-day workshop)
- Introduction to R for Non-Science Majors (2-day workshop)
- Cleaning Data with R
- Data Analysis with R
- Introduction to Time Series Analysis using R
- Use dplyr to Effectively Handle Data in R
- Write Your Own Personal R Package
You can book a one-to-one consultation with a specialist in the SFU library and get help with your R code.
Talking to an expert can be especially helpful when you haven't built up a functional knowledge of R or where/how to search for solutions online.