We’re pleased to announce a new version of roxygen2. The biggest news is that roxygen2 now recognises reference class method docstrings and will automatically add them to the documentation. 3.1.0 also offers a number of minor improvements and bug fixes, as listed on the github release notice.

As always, you can install the latest version with install.packages("roxygen2").

dplyr is a new package which provides a set of tools for efficiently manipulating datasets in R. dplyr is the next iteration of plyr, focussing on only data frames. dplyr is faster, has a more consistent API and should be easier to use. There are three key ideas that underlie dplyr:

  1. Your time is important, so Romain Francois has written the key pieces in Rcpp to provide blazing fast performance. Performance will only get better over time, especially once we figure out the best way to make the most of multiple processors.
  2. Tabular data is tabular data regardless of where it lives, so you should use the same functions to work with it. With dplyr, anything you can do to a local data frame you can also do to a remote database table. PostgreSQL, MySQL, SQLite and Google bigquery support is built-in; adding a new backend is a matter of implementing a handful of S3 methods.
  3. The bottleneck in most data analyses is the time it takes for you to figure out what to do with your data, and dplyr makes this easier by having individual functions that correspond to the most common operations (group_by, summarise, mutate, filter, select and arrange). Each function does one only thing, but does it well.

Lets compare plyr and dplyr with a little example, using the Batting dataset from the fantastic Lahman package which makes the complete Lahman baseball database easily accessible from R. Pretend we want to find the five players who have batted in the most games in all of baseball history.

In plyr, we might write code like this:

library(Lahman)
library(plyr)

games <- ddply(Batting, "playerID", summarise, total = sum(G))
head(arrange(games, desc(total)), 5)

We use ddply() to break up the Batting dataframe into pieces according to the playerID variable, then apply summarise() to reduce the player data to a single row. Each row in Batting represents one year of data for one player, so we figure out the total number of games with sum(G) and save it in a new variable called total. We sort the result so the most games come at the top and then use head() to pull off the first five.

In dplyr, the code is similar:

library(Lahman)
library(dplyr)

players <- group_by(Batting, playerID)
games <- summarise(players, total = sum(G))
head(arrange(games, desc(total)), 5)

But now grouping is now a top level operation performed by group_by(), and summarise() works directly on the grouped data, rather than being called from inside another function. The other big difference is speed. plyr took about 7s on my computer, and dplyr took 0.2s, a 35x speed-up. This is common when switching from plyr to dplyr, and for many operations you’ll see a 20x-1000x speedup.

dplyr provides another innovation over plyr: the ability to chain operations together from left to right with the %.% operator. This makes dplyr behave a little like a grammar of data manipulation:

Batting %.%
  group_by(playerID) %.%
  summarise(total = sum(G)) %.%
  arrange(desc(total)) %.%
  head(5)

Read more about it in the help, ?"%.%".

If this small example has whet your interest, you can learn more from the built-in vignettes. First install dplyr with install.packages("dplyr"), then run:

You can track development progress at http://github.com/hadley/dplyr, report bugs at http://github.com/hadley/dplyr/issues and get help with data manipulation challenges at https://groups.google.com/group/manipulatr. If you ask a question specifically about dplyr on StackOverflow, please tag it with dplyr and I’ll make sure to read it.

We’re pleased to announce a new version of roxygen2. The biggest news is that you can painlessly document your S4 classes, S4 methods and RC classes with roxygen2 – you can safely remove workarounds that used @alias and @usage, and simply rely on roxygen2 to do the right thing. Roxygen2 is also much smarter when it comes to S3: you can remove existing uses of @method, and can replace @S3method with @export.

Version 3.0 also includes many other improvements including better generation of usage, the ability to turn off wrapping in your Rd files and choose default roclets for a package, a safer roxygenise() (or roxyngenize() if you prefer) and many other bug fixes and improvement. See the full list on the github release.

As always, you can install the latest version with install.packages("roxygen2")

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.

We’re pleased to announce two upcoming in-person training opportunities:

  • Advanced R programming. SF, Dec 16-17.Learn the most important topics from advanced R programming in person. One day one, you’ll learn about metaprograming, functional programming and object oriented programming in R, as well general best practices for programming. Taught by Hadley Wickham, RStudio’s Chief Scientist.
  • Public workshop. Boston, Jan 27-28.In this two-day workshop, you’ll get a comprehensive introduction to R, and you’ll be visualising, manipulating and modeling data in no time. Taught by Garrett Grolemund, RStudio Master Instructor

We have discounts available for students (66%) and academics (33%). Please contact Josh Paulson for details.

We’re very pleased to announce the release of devtools 1.4. This version brings many improvements to package installation, including automated vignette building, and a better way of referring to repos on github, install_github("hadley/devtools"). There are also many other bug fixes and minor improvements; to see them all, please read the release notes file on github.

We’re very pleased to announce Shiny 0.8.0 (which actually went up on CRAN about two weeks ago). This release features a vastly better way to display tabular data, and new debugging tools that make it much easier to fix errors in your app.

DataTables support

datatables

We now support much more attractive and powerful displays of tabular data using the popular DataTables library. Our DataTables integration features pagination, searching/filtering, sorting, and more. Check out this demo to see it in action, and learn more about how to use it in your own apps by visiting the tutorial’s chapter on DataTables.

Debugging tools

In version 0.8.0 of the Shiny package, we’ve greatly improved the set of debugging tools you can use with your Shiny apps. It’s now much easier to figure out what’s happening when things go wrong, thanks to two new features:

  • Integration with the new visual debugger that’s available with RStudio v0.98. You can set breakpoints and step through your code much more easily than before.
  • A new option ‘shiny.error’ which can take a function as an error handler. It is called when an error occurs in a reactive observer (e.g. when running an output rendering function). You can use options(shiny.error=traceback) to simply print a traceback, options(shiny.error=recover) for debugging from a regular R console, or options(shiny.error=browser) to jump into the RStudio visual debugger.

There have also been a few smaller tweaks and bug fixes. For the full list, you can take a look at our NEWS file.

Welcome, Yihui Xie!

If you’re reading this, there’s a good chance you have heard of Yihui Xie or have used his software; during his time as a PhD student at Iowa State University, he created the knitr, cranvas, and animation packages, among others.

We’re thrilled to announce that Yihui has joined the RStudio team! He will be one of the primary maintainers of the Shiny package and has already contributed some great improvements in the short time he has been with us.

We’re excited to announce Packrat, a new tool for managing the packages your R project depends on.

If you’ve ever been frustrated by package dependencies, whether juggling the packages needed by your own projects or getting someone else’s project to work, Packrat is for you. Similar in spirit to Bundler, Packrat understands package dependencies and manages them inside a private, project-specific library.

Packrat makes your project more isolated, portable, and reproducible. Because your project’s package dependencies travel with it, you control the environment in which your code runs. Your results are easy to duplicate on other machines, whether your own or your collaborators’.

We built Packrat to help us create self-sufficient R projects for deployment, but we think it has many other use cases. Lots more information, including installation instructions, can be found at the Packrat project page:

Packrat: Reproducible package management for R.

If you try it, we’d love to get your feedback. Leave a comment here or post in the packrat-discuss Google group.

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.

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

Join 518 other followers

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

Follow

Get every new post delivered to your Inbox.

Join 518 other followers