You are currently browsing jjallaire’s articles.

Today we’re very pleased to announce a new version of RStudio (v0.98.932) which is available for download now. New features in this release include:

  • A next generation implementation of R Markdown with a raft of new features including support for HTML, PDF, and Word output, many new options for customizing document appearance, and the ability to create presentations (Beamer or HTML5).
  • Interactive Documents (Shiny meets R Markdown). Readers can now change the parameters underlying your analysis and see the results immediately. Interactive Documents make it easier than ever to use Shiny!
  • Shareable notebooks from R scripts. Notebooks include all R code and generated output, and can be rendered in HTML, PDF, and Word formats.
  • Enhanced debugging including support for the new R 3.1 debugging commands to step into function calls and finish the current loop or function.
  • Various source editor enhancements including new syntax highlighting modes for XML, YAML, SQL, Python, and shell scripts. You can also execute Python and shell scripts directly from the editor using Ctrl+Shift+Enter.
  • Integrated tools for Shiny development including the ability to run applications within an IDE pane as well as Run/Reload applications with a keyboard shortcut (Ctrl+Shift+Enter).
  • A new devtools mode for package development (uses devtools for check, document, test, build, etc.)
  • Contextual Git/SVN menu that enables quick access to per-file revision history and selection-aware View/Blame for projects hosted on GitHub.
  • Fast lookup of shortcuts using the new keyboard shortcut quick-reference card (Alt+Shift+K)

See the release notes for a full list of what’s changed and see Yihui Xie’s post on R Markdown v2 for more on what’s new there.

We’ll be posting additional articles over the next few days that describe the new features in more depth. In the meantime we hope you download the new version and as always let us know how it’s working and what else you’d like to see.

Today, we’re excited to announce the release of Shiny Server version 0.4 as well as the availability of a beta version of Shiny Server Professional Edition.

Shiny Server is a platform for hosting Shiny Applications over the Web and has undergone substantial work in the past few months. We have fixed many bugs, added stability enhancements, and have created pre-built installers for Ubuntu 12.04 (and later) and RedHat/CentOS 5 and 6. The new installers will drastically simplify the process of installing and configuring Shiny Server on these distributions. For other platforms you can use the updated instructions to build from source.

Important note for current Shiny Server users: We are no longer relying on npm to distribute the software. If you had previously installed version 0.3.x using npm, you must uninstall the old version before upgrading. Follow these instructions to uninstall the old version before upgrading to the new.

We hope this new version will allow you to deploy your Shiny applications even more efficiently. Please reach out on the mailing list to let us know what you think or if you have any problems.

Shiny Server Pro beta

We’ve recently begun beta testing of Shiny Server Professional Edition. This product adds features that make it easier for an enterprise to scale, tune, monitor and receive support for production environments.  Shiny Server Pro will include the ability to configure a Shiny application with more than one process, and control the number of concurrent users per application. It adds an administrative dashboard to monitor and gain insight into your applications, and includes integrations with a variety of authentication systems including LDAP and Active Directory.

If you’re interested in finding out more about Shiny Server Pro, or being a participant in our beta please register here.

Thank you for your help in making Shiny Server a better product.  We hope you enjoy Shiny Server 0.4 and look forward to getting your feedback.

We’re pleased to announce that the final version of RStudio v0.98 is available for download now. Highlights of the new release include:

  • An interactive debugger for R that is tightly integrated with base R debugging tools (browser, recover, etc.)
  • Numerous improvements to the Workspace pane (which is now called the Environment pane).
  • R Presentations for easy authoring of HTML5 presentations that include R code, output, and graphics.
  • A new Viewer pane for displaying local web content (e.g. graphical output from packages like googleVis).
  • Additional support for developing and running Shiny web applications.
  • Substantially improved UI performance on Mac OS X.
  • Professional Edition of RStudio Server with many new capabilities for enterprise deployment.

There are also lots of smaller improvements and bug fixes across the product, check out the release notes for full details.

Debugging Tools

The feature we’re most excited about is the addition of a full interactive debugger to the IDE. Noteworthy capabilities of the debugger include:

  • Setting breakpoints within the source editor, both inside and outside functions
  • Stepping through code line by line
  • Inspecting object values and the call stack during debugging
  • An error inspector for quick access to tracebacks and the debugger after runtime errors
  • Tight integration with traditional R debugging tools, such as browser() and debug()

Here’s a screenshot of the IDE after hitting an editor breakpoint:

RStudioDebugger

For more details on how to take advantage of the new debugging tools, see Debugging with RStudio.

Environment Pane

The Workspace pane is now called the Environment pane and has numerous improvements, including:

  • Browse any environment on the search path
  • Filtering by name/value
  • Expand lists, data frames, and S4 objects inline
  • Use str() to display object values
  • Optional grid view sortable by various attributes
  • Many other small correctness and robustness enhancements

R Presentations

R Presentations enable easy authoring of HTML5 presentations. R Presentations are based on R Markdown, and include the following features:

  • Easy authoring of HTML5 presentations based on R Markdown
  • Extensive support for authoring and previewing inside the IDE
  • Many options for customizing layout and appearance
  • Publishing as either a standalone HTML file or to RPubs

Here’s a screenshot showing a simple presentation being authored and previewed within the IDE:

RPresentations

For more details see the documentation on Authoring R Presentations.

Viewer Pane

RStudio now includes a Viewer pane that can be used to view local web content. This includes both static web content or even a local web application created using ShinyRook, or OpenCPU. This is especially useful for packages that have R bindings to Javascript data visualization libraries.

The googleVis and rCharts packages have already been updated to take advantage of the Viewer pane. Here’s a screenshot of the googleVis integration:

googleVis

We’re hopeful that there will be many more compelling uses of the Viewer. For more details see the article Extending RStudio with the Viewer Pane.

Shiny Integration

We’ve added a number of features to support development of Shiny web applications, including:

  • The ability to develop and run Shiny applications on RStudio Server (localhost and websocket proxying is handled automatically)
  • Running Shiny applications within an IDE pane (see the discussion of the Viewer pane below for details)
  • Create a new Shiny application from within the New Project dialog
  • Debugging of Shiny applications using the new RStudio debugging tools.

Mac UI Framework

In RStudio v0.98 we also migrated our Mac WebKit engine from a cross-platform framework (Qt) to Cocoa. The original motivation for this was compatibility problems between Qt and OS X Mavericks, but as it turned out the move to Cocoa WebKit yielded substantially faster editor, scrolling, layout, and graphics performance across the board. If you are a Mac user you’ll find everything about the product snappier in v0.98.

In the next major version of RStudio we’re hoping to make comparable improvements in performance on both Linux and Windows by using a more modern WebKit on those platforms as well.

RStudio Server Professional Edition

Over the years we’ve gotten lots of feedback from larger organizations deploying RStudio Server on the features they’d like to see for production deployments of the server. With RStudio v0.98 we’re introducing a new Professional Edition of RStudio Server that incorporates much of this feedback. Highlights include:

  • An administrative dashboard that provides insight into active sessions, server health, and monitoring of system-wide and per-user performance and resource metrics.
  • Authentication using system accounts, ActiveDirectory, LDAP, or Google Accounts.
  • Full support for PAM (including PAM sessions for dynamically provisioning user resources).
  • Ability to establish per-user or per-group CPU priorities and memory limits.
  • HTTP enhancements including support for SSL and keep-alive for improved performance.
  • Ability to restrict access to the server by IP.
  • Customizable server health checks.
  • Suspend, terminate, or assume control of user sessions.
  • Impersonate users for assistance and troubleshooting.

The RStudio Server product page has full details on the Professional Edition, and an evaluation version of the server is also available for download.

New Support Site

With this release we’re also introducing a brand new support and documentation website, please visit us there with questions, feedback, as well as what other improvements you’d like to see in the product.

When OS X Mavericks was released last month we were very disappointed to discover a compatibility issue between Qt (our cross-platform user interface toolkit) and OS X Mavericks that resulted in extremely poor graphics performance.

We now have an updated preview version of RStudio for OS X (v0.98.475) that not only overcomes these issues, but also improves editor, scrolling, and layout performance across the board on OS X (more details below if you are curious):

http://www.rstudio.com/ide/download/preview

We were initially optimistic that we could patch Qt to overcome the problems but even with some help from Digia (the organization behind Qt) we never got acceptable performance. Running out of viable options based on Qt, we decided to bypass Qt entirely by implementing the RStudio desktop frame as a native Cocoa application.

OS X Mavericks issues aside, we are thrilled with the result of using Cocoa rather than a cross-platform toolkit. RStudio desktop uses WebKit to render its user-interface, and the Cocoa WebKit Framework is substantially faster than the one in Qt.

Please try out the updated preview and let us know if you encounter any issues or problems on our support forum. For those that prefer to wait for the final release of v0.98 we expect that to happen sometime during the next couple of weeks.

UPDATERStudio OS X Mavericks Issues Resolved

This post is now out of date (see link above for information on getting a version of RStudio that works with OS X Mavericks).


Today Apple released OS X 10.9 “Mavericks”. If you are a Mac user and considering updating to the new OS  there are some RStudio compatibility issues to consider before you update.

As a result of a problem between Mavericks and the user interface toolkit underlying RStudio (Qt) the RStudio IDE is very slow in painting and user interactions  when running under Mavericks. We are following up with both Qt and Apple on resolving the compatibility issue. In the meantime there is a workaround available in the v0.98.443 release of RStudio that can be downloaded here:

http://www.rstudio.com/ide/download/preview

This version of RStudio detects when it is running on OS X Mavericks and in that case bypasses the use of Qt. Rather, a version of RStudio Server is run locally and connected to by a special RStudioIDE browser window. There are several differences you’ll notice when running in this mode:

  1. Only one instance of RStudio can be run at a time.
  2. The Mac native menubar is not used. Rather, the main menu appears inside the RStudio frame.
  3. Mac native file open and save dialogs are not used. Rather, internal versions of the dialogs are used.
  4. Finder file associations activate RStudio however don’t open the targeted file(s).
  5. The copy plot to clipboard function is not available.
  6. During a shutdown of Mac OS X when RStudio is running the current project’s Workspace is not saved automatically (however source files are).

We’re hoping that the underlying problem in OS X 10.9 is resolved in a future update or alternatively the Qt toolkit is updated to address the issue. If and when that occurs we’ll release a new version of RStudio that restores the previous RStudio behavior on OS X 10.9.

We’re very pleased to announce that a preview release of RStudio IDE v0.98 is available for download now. Major highlights of the new release include debugging tools, many improvements to environment/workspace browsing, and a new way to create HTML5 presentations using R Markdown. As usual there are also many small improvements and bug fixes. We’ll talk about some of the more interesting new features below, otherwise check out the release notes for full details.

Debugging Tools

We’ve done lots of work to add R debugging tools to the IDE, including:

  • Setting breakpoints within the source editor, both inside and outside functions
  • Stepping through code line by line
  • Inspecting object values and the call stack during debugging
  • An error inspector for quick access to tracebacks and the debugger after runtime errors
  • Tight integration with traditional R debugging tools, such as browser() and debug()

Here’s a screenshot of the IDE after hitting an editor breakpoint:

RStudioDebugger

Note that execution is stopped at the specified breakpoint, the environment is updated to show the objects within the context where execution was stopped, and commands for line by line stepping, continuing, and aborting the debug session appear in the console.

For more details on how to take advantage of the new tools, see Debugging with RStudio.

R Presentations

R Presentations enable easy authoring of HTML5 presentations. R Presentations are based on R Markdown, and include the following features:

  • Easy authoring of HTML5 presentations based on R Markdown
  • Extensive support for authoring and previewing inside the IDE
  • Many options for customizing layout and appearance
  • Publishing as either a standalone HTML file or to RPubs

Here’s a screenshot showing a simple presentation being authored and previewed within the IDE:

RPresentations

For more details see the documentation on Authoring R Presentations.

RStudio Server Pro

With RStudio v0.98 we’ve added a new Professional Edition of RStudio Server.  New features in RStudio Server Pro include:

  • An administrative dashboard that provides insight into active sessions, server health, and monitoring of system-wide and per-user performance and resource metrics.
  • Authentication using system accounts, ActiveDirectory, LDAP, or Google Accounts.
  • Full support for PAM (including PAM sessions for dynamically provisioning user resources).
  • Ability to establish per-user or per-group CPU priorities and memory limits.
  • HTTP enhancements including support for SSL and keep-alive for improved performance.
  • Ability to restrict access to the server by IP.
  • Customizable server health checks.
  • Suspend, terminate, or assume control of user sessions.
  • Impersonate users for assistance and troubleshooting.

The Professional Edition also includes priority support and a commercial license. You can get more details as well as download a free 45-day evaluation version from the RStudio Server Professional Preview page.

What’s Next

The preview release is feature complete and we expect to release the final version of v0.98 during the next few weeks. After that we’ll be focusing on adding features to make it easier to develop and deploy Shiny web applications and expect another release with those features before the end of the year.

Earlier this month a new version of the Rcpp package by Dirk Eddelbuettel and Romain François  was released to CRAN and today we’re excited to announce a new version of RStudio that integrates tightly with Rcpp.

First though more about some exciting new features in Rcpp 0.10.1. This release includes Rcpp attributes, which are simple annotations that you add to C++ source files to streamline calling C++ from R.  This makes it possible to write C++ functions and simply source them into R just as you’d source an R script. Here’s an example:

#include <Rcpp.h>
using namespace Rcpp;

// [[Rcpp::export]]
NumericMatrix gibbs(int N, int thin) {

   NumericMatrix mat(N, 2);
   double x = 0, y = 0;

   RNGScope scope;
   for(int i = 0; i < N; i++) {
      for(int j = 0; j < thin; j++) {
         x = R::rgamma(3.0, 1.0 / (y * y + 4));
         y = R::rnorm(1.0 / (x + 1), 1.0 / sqrt(2 * x + 2));
      }
      mat(i, 0) = x;
      mat(i, 1) = y;
   }

   return(mat);
}

By annotating the gibbs function with the Rcpp::export attribute, we indicate we’d like that function to be callable from R. As a result we can now call the function like this:

sourceCpp("gibbs.cpp")
gibbs(100, 10)

Thanks to the abstractions provided by Rcpp, the code implementing gibbs in C++ is nearly identical to the code you’d write in R, but runs 20 times faster.

The sourceCpp function makes it much easier to use C++ within interactive R sessions. In the new version of RStudio we did a few things to support this workflow. Here’s a screenshot showing the RStudio C++ editing mode:

In RStudio you can now source a C++ file in the same way as an R script, using the source button on the toolbar or Cmd+Shift+Enter. If errors occur during compilation then RStudio parses the GCC error log and presents the errors as a navigable list.

When using sourceCpp it’s also possible to embed R code within a C++ source file using a special block comment. RStudio treats this code as an R code chunk (similar to Sweave or R Markdown code chunks):

RStudio also includes extensive support for package development with Rcpp. For more details see the Using Rcpp with RStudio document on our website.

Note that if you want to try out the new features be sure you are running RStudio v0.97.237 as well as the very latest version of Rcpp (0.10.1) .

Today a new version of RStudio (v0.97) is available for download from our website.  The principal focus of this release was creating comprehensive tools for R package development. We also implemented many other frequently requested enhancements including a new Vim editing mode and a much improved Find and Replace pane. Here’s a summary of what’s new in the release:

Package Development

  • A new Build tab with package development commands and a view of build output and errors
  • Build and Reload command that rebuilds the package and reloads it in a fresh R session
  • Create a new package using existing source files via New Project
  • R documentation tools including previewing, spell-checking, and Roxygen aware editing
  • Integration with devtools package development functions
  • Support for Rcpp including syntax highlighting for C/C++ and gcc error navigation

Source Editor

  • Vim editing mode
  • Tomorrow suite of editor themes
  • Find and replace: incremental search, find/replace in selection, and backwards find
  • Auto-indenting: improved intelligence and new options to customize indenting behavior
  • New options: show whitespace, show indent guides, non-blinking cursor, focus console after executing code

More

  • New Restart R and Terminate R commands
  • More intelligent console history navigation with up/down arrow keys
  • View plots within a separate window/monitor.
  • Ability to set a global UI zoom-level
  • RStudio CRAN mirror (via Amazon CloudFront) for fast package downloads

There are also many more small improvements and bug fixes. Check out the v0.97 release notes for details on all of the changes.

RStudio’s mission from the beginning has been to create powerful tools that support the practices and techniques required for creating trustworthy, high quality analysis. For many years Hadley Wickham has been teaching and working on his own set of tools for R with many of the same core goals. We’ve been collaborating quite a bit with Hadley over the past couple of years and today we’re excited to announce that Hadley, Winston Chang, and Garrett Grolemund are joining RStudio so we can continue to work together much more closely.

You probably know Hadley from his work on ggplot2, plyr, and many other packages. Garrett was a PhD student of Hadley’s at Rice, and you might also know him from the lubridate package, which makes dealing with dates and time easier; he’s also been working on new tools for visualisation and new ways of thinking about the process of data analysis. Winston has been working full-time on ggplot2 for the last couple of months, squashing many bugs and repaying a lot of the technical debt that’s accumulated over the years. Winston’s also writing an R Graphics Cookbook for O’Reilly that should be available in the near future.

What does this mean for RStudio? We’ll of course continue developing open-source software like the RStudio IDE, ggplot2, and plyr (among many other projects). One of Hadley’s core focuses at RStudio will also be expanding our mission to include education, which we plan to offer in a variety of formats ranging from in-person training to some innovative new online courses. We’ll also be working on hosted services (like RPubs) as well as some new products that address the challenges of deploying R within larger organizations.

We’re all excited to begin this next phase of work together and will have lots more details to announce later this fall!

Today we’re very excited to announce RPubs, a free service that makes it easy to publish documents to the web from R. RPubs is a quick and easy way to disseminate data analysis and R code and do ad-hoc collaboration with peers.

RPubs documents are based on R Markdown, a new feature of knitr 0.5 and RStudio 0.96. To publish to RPubs within RStudio, you simply create an R Markdown document then click the Publish button within the HTML Preview window:

RPubs documents include a moderated comment stream for feedback and dialog with readers, and can be updated with changes by publishing again from within RStudio.

Note that you’ll only see the Publish button if you update to the latest version of RStudio (v0.96.230, available for download today).

The markdown package

RStudio has integrated support for working with R Markdown and publishing to RPubs, but we also want to make sure that no matter what tools you use it’s still possible to get the same results. To that end we’ve also been working on a new version of the markdown package (v0.5, available now on CRAN).

The markdown package provides a standalone implementation of R Markdown rendering that can be integrated with other editors and IDEs. The package includes a function to upload to RPubs, but is also flexible enough to support lots of other web publishing scenarios. We’ve been working with Jeff Horner on this and he has a more detailed write-up on the capabilities of the markdown package on his blog.

Gallery of examples

We’ve also published a gallery of example documents on RPubs—the gallery illustrates some of the most useful techniques for getting the most out of R Markdown, and includes the following articles:

Let us know what additional examples you’d like to see—we’ll be adding more in the weeks ahead.

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 600 other followers

RStudio is an affiliated project of the Foundation for Open Access Statistics

Follow

Get every new post delivered to your Inbox.

Join 600 other followers