+ - 0:00:00
Notes for current slide
Notes for next slide

RStudio v1.1 – What’s New

Exploring new features in v1.1 of the RStudio IDE

Kevin Ushey

2018-02-02

1 / 23

Hello! Pleased to meet you. My name's Kevin, and I am a software engineer at RStudio. I primarily work on the RStudio IDE.

I'm here to teach you about one year of IDE features in 20 minutes.

Wish me luck!

2 / 23

What's New?

I'm here to give you a tour of the new features that became part of the v1.1 release of the RStudio IDE. With this release, we now have:

3 / 23

What's New?

I'm here to give you a tour of the new features that became part of the v1.1 release of the RStudio IDE. With this release, we now have:

  • A Terminal tab, giving you access to a shell directly within the IDE,
3 / 23

What's New?

I'm here to give you a tour of the new features that became part of the v1.1 release of the RStudio IDE. With this release, we now have:

  • A Terminal tab, giving you access to a shell directly within the IDE,

  • An Object Explorer, for inspecting deeply-nested R objects,

3 / 23

What's New?

I'm here to give you a tour of the new features that became part of the v1.1 release of the RStudio IDE. With this release, we now have:

  • A Terminal tab, giving you access to a shell directly within the IDE,

  • An Object Explorer, for inspecting deeply-nested R objects,

  • A modern theme, including a dark IDE theme to accompany the dark editor themes,

3 / 23

What's New?

I'm here to give you a tour of the new features that became part of the v1.1 release of the RStudio IDE. With this release, we now have:

  • A Terminal tab, giving you access to a shell directly within the IDE,

  • An Object Explorer, for inspecting deeply-nested R objects,

  • A modern theme, including a dark IDE theme to accompany the dark editor themes,

  • A Connections tab, for managing connections to external SQL data stores,

3 / 23

What's New?

I'm here to give you a tour of the new features that became part of the v1.1 release of the RStudio IDE. With this release, we now have:

  • A Terminal tab, giving you access to a shell directly within the IDE,

  • An Object Explorer, for inspecting deeply-nested R objects,

  • A modern theme, including a dark IDE theme to accompany the dark editor themes,

  • A Connections tab, for managing connections to external SQL data stores,

  • Improvements to Git integration, making it easier to manage git branches from within the IDE, and

3 / 23

What's New?

I'm here to give you a tour of the new features that became part of the v1.1 release of the RStudio IDE. With this release, we now have:

  • A Terminal tab, giving you access to a shell directly within the IDE,

  • An Object Explorer, for inspecting deeply-nested R objects,

  • A modern theme, including a dark IDE theme to accompany the dark editor themes,

  • A Connections tab, for managing connections to external SQL data stores,

  • Improvements to Git integration, making it easier to manage git branches from within the IDE, and

  • A host of other useful miscellaneous features.

3 / 23

What's New?

I'm here to give you a tour of the new features that became part of the v1.1 release of the RStudio IDE. With this release, we now have:

  • A Terminal tab, giving you access to a shell directly within the IDE,

  • An Object Explorer, for inspecting deeply-nested R objects,

  • A modern theme, including a dark IDE theme to accompany the dark editor themes,

  • A Connections tab, for managing connections to external SQL data stores,

  • Improvements to Git integration, making it easier to manage git branches from within the IDE, and

  • A host of other useful miscellaneous features.

I'll be demoing most of these tools live, directly from the RStudio IDE. Let's get started!

3 / 23

Terminal Tab

R is an excellent tool, but it's not the best tool for all jobs. Sometimes, you just need a command line. The terminal gives you just that.

terminal

It's easy to send commands from an RStudio editor to the terminal. Just use Ctrl + Alt + Enter, or a plain Ctrl + Enter when working with a shell script.

4 / 23

Object Explorer

You may be familiar with the Data Viewer, which makes it easy to explore R data.frames...

data-viewer

5 / 23

Object Explorer

However, with RStudio v1.1, it's now possible to explore R lists (and other hierarchical objects) using the Object Explorer.

object-explorer

Let's use this to learn a bit about what a ggplot2 plot object looks like.

6 / 23

Modern Theme

RStudio v1.1 also comes with a brand new modern theme, with a 'flat' styling applied throughout.

If you're allergic to change, the classic theme is still available!

theme-options

But perhaps even more exciting is the dark theme.

7 / 23

Dark Theme

8 / 23

Connections

The Connections pane helps you manage connections to existing data stores, making it easy to slurp data from an external source into your R session.

connections

9 / 23

Connections

There is a bit of setup required to teach RStudio how to communicate with your data sources. I'm going to focus on the odbc package and its connections interface.

A brief description of what ODBC is, from Wikipedia:

In computing, Open Database Connectivity (ODBC) is a standard application programming interface (API) for accessing database management systems (DBMS).

The odbc R package gives your R session access to databases through the ODBC API.

10 / 23

Connections

If you want to use the odbc package, there's a bit of setup that you need to do first, to teach R and ODBC about the database connections available on your machine.

The full documentation is available at http://db.rstudio.com, but the incredibly short version of that documentation is:

11 / 23

Connections

If you want to use the odbc package, there's a bit of setup that you need to do first, to teach R and ODBC about the database connections available on your machine.

The full documentation is available at http://db.rstudio.com, but the incredibly short version of that documentation is:

  1. Declare the database drivers you want to use in odbcinst.ini,
11 / 23

Connections

If you want to use the odbc package, there's a bit of setup that you need to do first, to teach R and ODBC about the database connections available on your machine.

The full documentation is available at http://db.rstudio.com, but the incredibly short version of that documentation is:

  1. Declare the database drivers you want to use in odbcinst.ini,

  2. Declare the actual database connections you'll be making in odbc.ini,

11 / 23

Connections

If you want to use the odbc package, there's a bit of setup that you need to do first, to teach R and ODBC about the database connections available on your machine.

The full documentation is available at http://db.rstudio.com, but the incredibly short version of that documentation is:

  1. Declare the database drivers you want to use in odbcinst.ini,

  2. Declare the actual database connections you'll be making in odbc.ini,

  3. Create a connection from the connections pane.

11 / 23

Connections

If you want to use the odbc package, there's a bit of setup that you need to do first, to teach R and ODBC about the database connections available on your machine.

The full documentation is available at http://db.rstudio.com, but the incredibly short version of that documentation is:

  1. Declare the database drivers you want to use in odbcinst.ini,

  2. Declare the actual database connections you'll be making in odbc.ini,

  3. Create a connection from the connections pane.

On my macOS machine, these files are located at:

  • /usr/local/etc/odbcinst.ini
  • /usr/local/etc/odbc.ini

You can execute odbcinst -j to check where yours live.

11 / 23

Connections

I'll be using a database of Shakespeare's works provided by Open Source Shakespeare, at https://www.opensourceshakespeare.org.

We'll use the DBI package to access and query tables in this database.

library(DBI)
conn <- dbConnect(odbc::odbc(), "Open Source Shakespeare")
dbListTables(conn)
## [1] "chapter" "character" "character_work" "paragraph"
## [5] "wordform" "work"
12 / 23

Connections

Let's pull a table out and take a look with dplyr.

work_tbl <- tbl(conn, "work")
# what kinds of works are in this db?
work_tbl %>%
group_by(genretype) %>%
summarise(n = n())
## # Source: lazy query [?? x 2]
## # Database: postgres [kevin@localhost:/shakespeare]
## genretype n
## <chr> <S3: integer64>
## 1 t 11
## 2 s 1
## 3 h 12
## 4 c 14
## 5 p 5
13 / 23

Connections

In short: does your organization have a giant bucket of data hiding in a SQL data store somewhere? Want to get it into R? odbc may be your new best friend.

14 / 23

Connections

In short: does your organization have a giant bucket of data hiding in a SQL data store somewhere? Want to get it into R? odbc may be your new best friend.

Need to access a database for which open-source drivers are not available? Consider our professional drivers.

Use the connections pane to manage connections to your organization's external data stores, and use the database family of R packages to manipulate and analyze the data hiding within.

14 / 23

Git

Prior to RStudio v1.1, it was possible to manage existing branches within a project, but creating a branch required the command line. No more!

git-create-branch

15 / 23

Git

It's now possible to search existing branches, which becomes more important as your project adds new collaborators, with parallel work on different features.

git-switch-branch

16 / 23

Miscellaneous Items

There are also a number of small 'quality-of-life' features that made their way into the v1.1 release of RStudio, which are worth knowing.

17 / 23

Color in the Console

color-console

18 / 23

Addins List

RStudio Addins were an RStudio v1.0 feature that made it possible for users to write simple RStudio plugins that are able to interact directly with RStudio, and even bind their execution to keyboard shortcuts.

So, technically, this is not a new feature.

19 / 23

Addins List

However, the popularity of RStudio Addins grew far beyond what we initially anticipated, so the original menu was hardly adequate for users with more than a couple addins installed. Now, addins are searchable, and indicate the package they are associated with.

addins-v11

20 / 23

Searchable Command History

The commands you've run get saved into a command history. Need to recall something you wrote a while back? Use Ctrl + R with the cursor in the Console pane to search that list.

command-history

21 / 23

Project Templates

It's now possible for R packages to define project templates, which makes it easy to initialize new kinds of projects from within RStudio.

Feel like starting on a new book? Let bookdown get your project ready for you.

22 / 23

https://github.com/kevinushey/2018-rstudio-conf


Thanks!

Download the latest RStudio release at:
https://www.rstudio.com/products/rstudio/download

Stay in touch with the IDE team! Join us at:
https://community.rstudio.com/c/rstudio-ide

New to RStudio? Check out the slides from my 2017 rstudio::conf talk at:
https://rawgit.com/kevinushey/2017-rstudio-conf/master/slides.html

And finally, find these slides available at:
https://rawgit.com/kevinushey/2018-rstudio-conf/master/slides.html

23 / 23

Hello! Pleased to meet you. My name's Kevin, and I am a software engineer at RStudio. I primarily work on the RStudio IDE.

I'm here to teach you about one year of IDE features in 20 minutes.

Wish me luck!

2 / 23
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow