The R Language is a free computer programming language developed for data analysis.
A number of different apps have been developed for conducting analyses written in the R Language. Somewhat confusingly, the most widely used program for conducting analyses using the R language is also called R (or the R Console). Displayr has special servers with R installed and any R code used by Displayr is processed there, more info is here.
Method - External Resources
Because R is an open-sourced (free) language, there are tons of information about it on the web. There are technical pages on the different functions, websites offering courses, forums where you can ask and search for questions, and blogs with worked examples. Whichever format is best for you will depend upon your technical skills, background, and what you are trying to achieve.
Some methods to call out that we've found useful include:
- Online courses: DataCamp and Bootcamp are two sites to look into.
- Books: There are many different books on R and the trick is usually to find a book written by somebody whose background matches your own. The Art of Programming in R is a staff favorite.
- Webpages and blogs: R-bloggers is great and Cross Validated has a long list of free websites.
- RStudio has created a lot of "cheatsheets" (in addition to other educational resources) that outline some useful functions in R. You can start with the Base R cheatsheet here.
When troubleshooting R, simply putting in the error message or a description of the issue in Google and adding "in R" at the end should be your first stop. This will search over the many forums that are out there where users ask similar questions. One of the most widely used forums, if you want to search directly, is StackOverflow.
Method - Displayr Resources
- There are a plethora of examples of R coding in our Displayr Help Center if you search for "How to X Using R".
- Our Using R in Displayr Video Series gives you an intro into how to use R in Displayr and walks through many examples of R coding in Displayr. You can also download the code and examples directly to your Displayr account to follow along.
- The following articles are a good intro for getting the basics down of how to code in R in Displayr:
-
- How to Use R in Displayr
- How R Works Differently in Displayr Compared to Other Programs
- How to Use Different Types of Data in R
- How to Work with Data in R
- How to Work with R Loops
- How to Use Point and Click Inside R Code
- How to Reference and Distinguish between Different R Objects in Displayr
- How to Work with Conditional R Formulas
-
- Some of our most useful R examples are below:
-
- How to Connect Filters to Controls Using R Code
- How to Use R Code to Create a Filter Based on Single-Response Questions
- How to Perform Mathematical Calculations Using R
- How to Create a New Variable Based on Other Variables using R
- How to Band Numeric Variables Using R
- How to Hide Rows or Columns Based on Sample Size Using R
- How to Extract Data from a Multiple Column Table
- How to Merge Tables Using R
- How to Aggregate Data Using R
- How to Standardize or Calculate Data within Subgroups in R
- How to Extract Information from an R Object
- How to Handle Outputs with Small or No Data using R
-
- While we don't offer formal R training at Displayr, we can try to help point you in the right direction or get you unstuck if you email support@displayr.com.
Other tips to keep in mind
- Please use # to comment your code. This will help you remember what the intent of the code is when you review it later. It will also help our Support Team, if you email us asking for help.
- R is case-sensitive.
- Sometimes there are many ways to do the same thing and there's not necessarily a "right answer"
See Also
Using R in Displayr Video Series
How R Works Differently in Displayr Compared to Other Programs
How to Reference and Distinguish between Different R Objects in Displayr
How to Use Point and Click Inside R Code
How to Use Different Types of Data in R