You are currently browsing the category archive for the ‘News’ category.
We’re very pleased to announce the release of devtools 1.0. We’ve given devtools the 1.0 marker because it now works with the vast majority of packages in the wild, with this version adding support for S4 and Rcpp. Devtools also has completely revamped code for finding Rtools on windows, including much better error messages if something is wrong with your setup. In celebration of reaching 1.0, devtools now has it’s own webpage, which provides a bit more information about why you might want to use it.
Devtools 1.0 also contains many other bug fixes and minor improvements, as listed in the NEWS file on github.
Shiny makes it easy to develop interactive web applications that run on your own machine. But by itself, it isn’t designed to make your applications available to all comers over the internet (or intranet). You can’t run more than one Shiny application on the same port, and if your R process crashes or exits for any reason, your service becomes unavailable.
Our solution is Shiny Server, the application server for Shiny. Using Shiny Server, you can host multiple Shiny applications, as well as static web content, on a Linux server and make them available over the internet. You can specify what applications are available at what URL, or configure Shiny Server to let anyone with a user account on the server deploy their own Shiny applications. For more details, see our previous blog post.
Shiny Server is available as a public beta today. Follow the instructions on our GitHub project page to get started now!
Last month we released Shiny, our new R package for creating interactive web applications. The response from the community has been extremely encouraging–we’ve received a lot of great feedback that has helped us to make significant improvements to the framework already!
Shiny 0.2.3 on CRAN
Starting with Shiny 0.2.3, you can install the latest stable version of Shiny directly from CRAN. Since the initial release, we’ve added some interesting features to Shiny, most notably the ability to offer on-the-fly file downloads. We’ve also fixed some bugs, including an issue with runGist that caused it to fail on many Windows systems.
Install or upgrade now by running: install.packages('shiny')
Coming soon: Shiny Server
While Shiny works great today for running apps on your own machine, we indicated in our original blog post that for web-based deployment we’d be offering hosting services and a software package for deploying Shiny applications on a server.
Today we have more details to share about Shiny Server, the software package which will allow you to deploy Shiny applications on your own server:
- Free and open source (AGPLv3 license)
- Host multiple applications on the same port, with a different URL path per application
- Allows Shiny applications to work with Internet Explorer 8 and 9
- Automatically starts and stops R sessions as needed
- Detects and recovers from crashed R sessions
- Designed to serve applications directly to browsers, or be proxied behind another web server like Apache/Nginx
- Works across network gateways and proxies that don’t support websockets
Our goal is to begin beta testing by the end of January. Shiny Server will require Linux at launch, though we will likely add Windows and Mac support later.
While we previously said that Shiny Server would be commercial software, we’ve decided to make it free and open source instead. Later in 2013 we hope to introduce a paid edition of Shiny Server that will include additional features that are targeted at larger organizations.
That’s all we have on the Shiny front for now. If you have questions, leave us a comment, or drop by our active and growing community at shiny-discuss!
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) .
Say hello to Shiny, a new R package that we’re releasing for public beta testing today.
Shiny makes it super simple for R users to turn analyses into interactive web applications that anyone can use. These applications let you specify input parameters using friendly controls like sliders, drop-downs, and text fields; and they can easily incorporate any number of outputs like plots, tables, and summaries.
No HTML or JavaScript knowledge is necessary. If you have some experience with R, you’re just minutes away from combining the statistical power of R with the simplicity of a web page:

More details, including live examples and a link to an extensive tutorial, can be found on the Shiny homepage.
The Shiny package is free and open source, and is designed primarily to run Shiny applications locally. To share Shiny applications with others, you can send them your application source as a GitHub gist, R package, or zip file (see details). We’re also working on a Shiny server that is designed to provide enterprise-grade application hosting, which we’ll offer as a subscription-based hosting service and/or commercial software package.
We’re really excited about Shiny, and look forward to seeing what kind of applications you come up with!
(Special thanks to Bryan Lewis for authoring the websockets package, which is used heavily by Shiny.)
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.
At RStudio, we want you to be effective R users. As well as creating great software, we want to make it easier for you to master R. To this end, we’re very happy to announce our new training offerings.
We’re kicking off with two public courses:
- Effective data visualisation and reports and reproducible research in San Francisco, Dec 3-4.
- Advanced R programming and package development in Washington DC, Dec 10-12.
We’ve also planned a number of other courses, based on our experience with the R community, seeing what’s hard to learn and what people are struggling with. These courses are available now if you’d like us to come to your company, and based on your feedback we’ll offer public versions in the near future.
You can also read about our instructors and our philosophy.
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:
- MathJax and Writing Equations
- Dynamic Graphics with the googleVis Package
- Customizing Chunk Options
- Caching Code Chunks
Let us know what additional examples you’d like to see—we’ll be adding more in the weeks ahead.
We’ve just a made a change to the syntax for embedding MathJax equations in R Markdown documents. The change was made to eliminate some parsing ambiguities and to support future extensibility to additional formats.
The revised syntax adds a “latex” qualifier to the $ or $$ equation begin delimiter. It looks like this:
This change was the result of a few considerations:
- Some users encountered situations where the $<equation>$ syntax recognized standard text as an equation. There was an escape sequence (\$) to avoid this but for users not explicitly aware of MathJax semantics this was too hard to discover.
- The requirement to have no space between equation delimiters ($) and the equation body (intended to reduce parsing ambiguity) was also confusing for users.
- We want to eventually support ASCIIMath and for this will require an additional qualifier to indicate the equation format.
RStudio v0.96.227 implements the new MathJax syntax and is available for download now.





