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, seeWhat is R? from theR 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 makeyour own work more effective and efficient, but also makeyour 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 blindyou to underlyingmechanism 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 apipeline of new packages
Packagesare collections ofRfunctions, data and code written by a very activity community of R users. Packages canhelp you solve your specific data issues more effectively -- andthere are currently thousands of R packages for download, with more new packages onthe way to expand what you can do with R. (And these packages are free too!)
R has robustonline 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.
R is open source -- a benefit for those who don’t have the budget forproprietary 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 academiaand industry?Read this article The Popularity of Data Science Softwareby data scientist Robert Muenchenon comparison between R and other statistical packages.
Download R
F Windows, Mac OS X, and Linux for free from CRAN (Comprehensive R Archive Network).
Download RStudio
An integrated development environment (IDE) for R. It provides a user-friendly interface for R with features to make working with R easier. Itis 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.
Here are a few recommended resources to get you started:
How to LearnR
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 andtutorials on various topics such as reading data to R, subsettingdata, and step-by-step instructions toanalyze major public-use survey data sets with R by Anthony Damico.
Free Introduction to R Programming Online Courseby DataCamp
An interactive course with a lot of exercises to help you master some basic conceptsof R, including factors, lists and data frames.
Introduction to R for Data Scienceby edX
An introductory R course to help you grasp Rlanguage 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."
A common challenge many beginners, and even experiencedusers of R, faces is how to clean and converttheir data into format that allows for easy analysis. Potentially helpful resources include:
How to LearnR
The Data Manipulation section in this guide includes resources for dealing withmessy data, including string, times and dates, and time series data.
Books
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 inprint]
- Statisticaldata cleaningwith applications inR [print]
Expert user or beginner? R mavens may want to start with R Help documentation.
If you're just getting started, or can't find what you're looking for in R Help's predefined key terms, we recommend searching the web for your topic, or seeking help from the R community.
You can also attend a Library workshop, or book a one-to-one consultation. See below for details!
R Help menu
RStudio and RGuiConsole 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 linkson the Help page are Packages andSearch 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 Rpackages:click on a package and you will see a list of functionsfor the package.
R community help
R Stackoverflow
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 ofpast 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
R Consultations
You can book a one-to-one consultationwith a specialist in the SFU library and get help with your R code.
Talking to an expertcan be especially helpful when you haven't built up a functionalknowledge of R or where/how to search for solutions online.