RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, and a variety of robust tools for plotting, viewing history, debugging and managing your workspace. Learn More about RStudio features.
The University of Regina's 200 academic programs and 10 faculties provide undergraduate/graduate students opportunities through knowledge and action.
RStudio’s new solution for every professional data science team. RStudio Team includes RStudio Server Pro, RStudio Connect and RStudio Package Manager. LEARN MORE
Open Source License | Commercial License | Open Source License | Commercial License | |
---|---|---|---|---|
FREE | $995 per year | FREE | $4,975 per year (5 Named Users) | |
Evaluation | Learn More | ||||
Integrated Tools for R | ||||
Priority Support | ||||
Access via Web Browser | ||||
Enterprise Security | ||||
Project Sharing | ||||
Manage Multiple R Sessions & Versions | ||||
Admin Dashboard | ||||
Load Balancing | ||||
Auditing and Monitoring | ||||
Data Connectivity | ||||
Launcher | ||||
Tutorial API | ||||
License | AGPL | Commercial | AGPL | Commercial |
RStudio Desktop | RStudio Server Pro | |||
FREE | $995 per year | FREE | $4,975 per year (5 Named Users) | |
Evaluation | Learn More |
RStudio Desktop 1.2.1335 — Release Notes
RStudio requires R 3.0.1+. If you don't already have R, download it here.
Linux users may need to import RStudio's public code-signing key prior to installation, depending on the operating system's security policy.
RStudio 1.2 requires a 64-bit operating system, and works exclusively with the 64 bit version of R. If you are on a 32 bit system or need the 32 bit version of R, you can use an older version of RStudio.
Installers for Supported Platforms
Installers | Size | Date | MD5 |
---|---|---|---|
RStudio 1.2.1335 - Windows 7+ (64-bit) | 126.9 MB | 2019-04-08 | d0e2470f1f8ef4cd35a669aa323a2136 |
RStudio 1.2.1335 - Mac OS X 10.12+ (64-bit) | 121.1 MB | 2019-04-08 | 6c570b0e2144583f7c48c284ce299eef |
RStudio 1.2.1335 - Ubuntu 14/Debian 8 (64-bit) | 92.2 MB | 2019-04-08 | c1b07d0511469abfe582919b183eee83 |
RStudio 1.2.1335 - Ubuntu 16 (64-bit) | 99.3 MB | 2019-04-08 | c142d69c210257fb10d18c045fff13c7 |
RStudio 1.2.1335 - Ubuntu 18 (64-bit) | 100.4 MB | 2019-04-08 | 71a8d1990c0d97939804b46cfb0aea75 |
RStudio 1.2.1335 - Fedora 19+/RedHat 7+ (64-bit) | 114.1 MB | 2019-04-08 | 296b6ef88969a91297fab6545f256a7a |
RStudio 1.2.1335 - Debian 9+ (64-bit) | 100.6 MB | 2019-04-08 | 1e32d4d6f6e216f086a81ca82ef65a91 |
RStudio 1.2.1335 - OpenSUSE 15+ (64-bit) | 101.6 MB | 2019-04-08 | 2795a63c7efd8e2aa2dae86ba09a81e5 |
RStudio 1.2.1335 - SLES/OpenSUSE 12+ (64-bit) | 94.4 MB | 2019-04-08 | c65424b06ef6737279d982db9eefcae1 |
Zip/Tarballs
Zip/tar archives | Size | Date | MD5 |
---|---|---|---|
RStudio 1.2.1335 - Windows 7+ (64-bit) | 186.6 MB | 2019-04-08 | f1e013ade0c241969400507cf258e0ad |
RStudio 1.2.1335 - Ubuntu 14/Debian 8 (64-bit) | 137.6 MB | 2019-04-08 | e3e1ea2dd113fd9cfd40bc5035effdde |
RStudio 1.2.1335 - Ubuntu 18 (64-bit) | 147.8 MB | 2019-04-08 | 5ee7dd7b501675f0a631c62d403ea1b6 |
RStudio 1.2.1335 - Debian 9+ (64-bit) | 148.1 MB | 2019-04-08 | 8090451cb7d520633eba80fd355ad4c1 |
RStudio 1.2.1335 - Fedora 19+/RedHat 7+ (64-bit) | 147.2 MB | 2019-04-08 | 34630cd7c66c3429879bd79982349380 |
Source Code
A tarball containing source code for RStudio v1.2.1335 can be downloaded from hereObtaining R
R is available for Linux, MacOS, and Windows. Software can be downloaded from The Comprehensive R Archive Network (CRAN).
Startup
After R is downloaded and installed, simply find and launch R from your Applications folder.
Entering Commands
R is a command line driven program. The user enters commands at the prompt (> by default) and each command is executed one at a time.
The Workspace
The workspace is your current R working environment and includes any user-defined objects (vectors, matrices, data frames, lists, functions). At the end of an R session, the user can save an image of the current workspace that is automatically reloaded the next time R is started.
Graphic User Interfaces
Aside from the built in R console, RStudio is the most popular R code editor, and it interfaces with R for Windows, MacOS, and Linux platforms.
Operators in R
R's binary and logical operators will look very familiar to programmers. Note that binary operators work on vectors and matrices as well as scalars.
Arithmetic Operators include:
Operator | Description |
+ | addition |
- | subtraction |
* | multiplication |
/ | division |
^ or ** | exponentiation |
Logical Operators include:
Operator | Description |
> | greater than |
>= | greater than or equal to |
exactly equal to | |
!= | not equal to |
Data Types
R has a wide variety of data types including scalars, vectors (numerical, character, logical), matrices, data frames, and lists.
Creating New Variables
Use the assignment operator <- to create new variables.
# An example of computing the mean with variables
mydata$sum <- mydata$x1 + mydata$x2
mydata$mean <- (mydata$x1 + mydata$x2)/2
Functions
Almost everything in R is done through functions. A function is a piece of code written to carry out a specified task; it may accept arguments or parameters (or not) and it may return one or more values (or not!). In R, a function is defined with the construct:
function ( arglist ) {body}
The code in between the curly braces is the body of the function. Note that by using built-in functions, the only thing you need to worry about is how to effectively communicate the correct input arguments (arglist) and manage the return value/s (if any).
Importing Data
Importing data into R is fairly simple. R offers options to import many file types, from CSVs to databases.
For example, this is how to import a CSV into R.
# first row contains variable names, comma is separator
# assign the variable id to row names
# note the / instead of on mswindows systems
mydata <- read.table('c:/mydata.csv', header=TRUE,
sep=',', row.names='id')
Descriptive Statistics
R provides a wide range of functions for obtaining summary statistics. One way to get descriptive statistics is to use the sapply( ) function with a specified summary statistic.
Below is how to get the mean with the sapply( ) function:
# get means for variables in data frame mydata
# excluding missing values
sapply(mydata, mean, na.rm=TRUE)
Possible functions used in sapply include mean, sd, var, min, max, median, range, and quantile.
Plotting in R
In R, graphs are typically created interactively. Here is an example:
# Creating a Graph
attach(mtcars)
plot(wt, mpg)
abline(lm(mpg~wt))
title('Regression of MPG on Weight')
The plot( ) function opens a graph window and plots weight vs. miles per gallon. The next line of code adds a regression line to this graph. The final line adds a title.
Packages
Packages are collections of R functions, data, and compiled code in a well-defined format. The directory where packages are stored is called the library. R comes with a standard set of packages. Others are available for download and installation. Once installed, they have to be loaded into the session to be used.
.libPaths() # get library location
library() # see all packages installed
search() # see packages currently loaded
Getting Help
Once R is installed, there is a comprehensive built-in help system. At the program's command prompt you can use any of the following:
help.start() # general help
help(foo) # help about function foo
?foo # same thing
apropos('foo') # list all functions containing string foo
example(foo) # show an example of function foo
Going Further
If you prefer an online interactive environment to learn R, this free R tutorial by DataCamp is a great way to get started.