Today we’re very pleased to announce the availability of RStudio Version 1.0! Version 1.0 is our 10th major release since the initial launch in February 2011 (see the full release history below), and our biggest ever! Highlights include:

  • Authoring tools for R Notebooks.
  • Integrated support for the sparklyr package (R interface to Spark).
  • Performance profiling via integration with the profvis package.
  • Enhanced data import tools based on the readr, readxl and haven packages.
  • Authoring tools for R Markdown websites and the bookdown package.
  • Many other miscellaneous enhancements and bug fixes.

We hope you download version 1.0 now and as always let us know what you think.

R Notebooks

R Notebooks add a powerful notebook authoring engine to R Markdown. Notebook interfaces for data analysis have compelling advantages including the close association of code and output and the ability to intersperse narrative with computation. Notebooks are also an excellent tool for teaching and a convenient way to share analyses.

Interactive R Markdown

As an authoring format, R Markdown bears many similarities to traditional notebooks like Jupyter and Beaker. However, code in notebooks is typically executed interactively, one cell at a time, whereas code in R Markdown documents is typically executed in batch.

R Notebooks bring the interactive model of execution to your R Markdown documents, giving you the capability to work quickly and iteratively in a notebook interface without leaving behind the plain-text tools, compatibility with version control, and production-quality output you’ve come to rely on from R Markdown.

Iterate Quickly

In a typical R Markdown document, you must re-knit the document to see your changes, which can take some time if it contains non-trivial computations. R Notebooks, however, let you run code and see the results in the document immediately. They can include just about any kind of content R produces, including console output, plots, data frames, and interactive HTML widgets.

screen-shot-2016-09-20-at-4-16-47-pm

You can see the progress of the code as it runs:

screen-shot-2016-09-21-at-10-52-02-am

You can preview the results of individual inline expressions, too:

notebook-inline-output

Even your LaTeX equations render in real-time as you type:

notebook-mathjax

This focused mode of interaction doesn’t require you to keep the console, viewer, or output panes open. Everything you need is at your fingertips in the editor, reducing distractions and helping you concentrate on your analysis. When you’re done, you’ll have a formatted, reproducible record of what you’ve accomplished, with plenty of context, perfect for your own records or sharing with others.

Spark with sparklyr

The sparklyr package is a new R interface for Apache Spark. RStudio now includes integrated support for Spark and the sparklyr package, including tools for:

  • Creating and managing Spark connections
  • Browsing the tables and columns of Spark DataFrames
  • Previewing the first 1,000 rows of Spark DataFrames

Once you’ve installed the sparklyr package, you should find a new Spark pane within the IDE. This pane includes a New Connection dialog which can be used to make connections to local or remote Spark instances:

Once you’ve connected to Spark you’ll be able to browse the tables contained within the Spark cluster:

The Spark DataFrame preview uses the standard RStudio data viewer:

Profiling with profvis

“How can I make my code faster?”

If you write R code, then you’ve probably asked yourself this question. A profiler is an important tool for doing this: it records how the computer spends its time, and once you know that, you can focus on the slow parts to make them faster.

RStudio now includes integrated support for profiling R code and for visualizing profiling data. R itself has long had a built-in profiler, and now it’s easier than ever to use the profiler and interpret the results.

To profile code with RStudio, select it in the editor, and then click on Profile -> Profile Selected Line(s). R will run that code with the profiler turned on, and then open up an interactive visualization.

In the visualization, there are two main parts: on top, there is the code with information about the amount of time spent executing each line, and on the bottom there is a flame graph, which shows what R was doing over time. In the flame graph, the horizontal direction represents time, moving from left to right, and the vertical direction represents the call stack, which are the functions that are currently being called. (Each time a function calls another function, it goes on top of the stack, and when a function exits, it is removed from the stack.)

profile.png

The Data tab contains a call tree, showing which function calls are most expensive:

Profiling data pane

Armed with this information, you’ll know what parts of your code to focus on to speed things up!

Data Import

RStudio now integrates with the readr, readxl, and haven packages to provide comprehensive tools for importing data from many text file formats, Excel worksheets, as well as SAS, Stata, and SPSS data files. The tools are focused on interactively refining an import then providing the code required to reproduce the import on new datasets.

For example, here’s the workflow we would use to import the Excel worksheet at http://www.fns.usda.gov/sites/default/files/pd/slsummar.xls.

First provide the dataset URL and review the import in preview mode (notice that this file contains two tables and as a result requires the first few rows to be removed):

We can clean this up by skipping 6 rows from this file and unchecking the “First Row as Names” checkbox:

The file is looking better but some columns are being displayed as strings when they are clearly numerical data. We can fix this by selecting “numeric” from the column drop-down:

The final step is to click “Import” to run the code displayed under “Code Preview” and import the data into R. The code is executed within the console and imported dataset is displayed automatically:

Note that rather than executing the import we could have just copied and pasted the import code and included it within any R script.

RStudio Release History

We started working on RStudio in November of 2008 (8 years ago!) and had our first public release in February of 2011. Here are highlights of the various releases through the years:

Version Date Highlights
0.92 Feb 2011
  • Initial public release
0.93 Apr 2011
  • Interactive plotting with manipulate
  • Source editor themes
  • Configurable workspace layout
0.94 Jun 2011
  • Enhanced plot export
  • Enhanced package installation and management
  • Enhanced history management
0.95 Jan 2012
  • RStudio project system
  • Code navigation (typeahead search, go to definition)
  • Version control integration (Git and Subversion)
0.96 May 2012
  • Enhanced authoring for Sweave
  • Web publishing with R Markdown
  • Code folding and many other editing enhancements
0.97 Oct 2012
  • Package development tools
  • Vim editing mode
  • More intelligent R auto-indentation
0.98 Dec 2013
  • Interactive debugging tools
  • Enhanced environment pane
  • Viewer pane for web content / htmlwidgets
0.98b Jun 2014
  • R Markdown v2 (publish to PDF, Word, and more)
  • Integrated tools for Shiny application development
  • Editor support for XML, SQL, Python, and Bash
0.99 May 2015
  • Data viewer with support for large datasets, filtering, searching, and sorting
  • Major enhancements to R and C/C++ code completion and inline code diagnostics
  • Multiple cursors, tab re-ordering, enhanced Vim mode
0.99b Feb 2016
  • Emacs editing mode
  • Multi-window source editing
  • Customizable keyboard shortcuts
  • RStudio Addins
1.0 Nov 2016
  • Authoring tools for R Notebooks
  • Integrated support for sparklyr (R interface to Spark)
  • Enhanced data import tools
  • Performance profiling via integration with profvis

The RStudio Release History page on our support website provides a complete history of all major and minor point releases.

 

Waw – excellent achievement! Have used these exciting features in review version – glad to have this GA version. Thanks RStudio!

This is awesome and I enjoyed every bit of Rnotebook. I have a question though: when I run a function that prints progress bar, it shows beneath the chunk inline, which is nice but also show up in the rendered in notebook output, which is bad. I know I can hide them altogether but is there a way to show it interactively but not in the doc?

    There is not currently a way to do this with notebooks alone — what you see is what you get. However, you can always add another output format (such as html_document) and knit to that format when you want to produce something to publish; then you can use interactive() to determine whether or not to show the progress bar. Would that do what you want?

      Thanks Jonathan! I think this is an okay workaround for now. It is not ideal because the `html_document` format has different behavior with `html_notebook` e.g. table rendering, chart, and etc. Excited to see the future enhancements of R notebook.

This is awesome and I enjoyed every bit of Rnotebook. I have a question though: when I run a function that prints progress bar, it shows beneath the chunk inline, which is nice but also show up in the rendered in notebook output, which is bad. I know I can hide them altogether but is there a way to show it interactively but not in the doc?

Thank you for this excellent version!

Unfortunately, I have experienced a fatal error during installation since the preview version:

error message:

JavaScript Alert – 127.0.0.1

   A fatal error encountered. The session was terminated.

Any hint?

OS: Windows 10 Pro 64-bit

Congratulations!

[…] Source: Announcing RStudio v1.0! | RStudio Blog […]

Well done. 1!
Been all the way.
Many thanks.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: