You are currently browsing the category archive for the ‘RStudio IDE’ category.

RStudio’s data viewer provides a quick way to look at the contents of data frames and other column-based data in your R environment. You invoke it by clicking on the grid icon in the Environment pane, or at the console by typing View(mydata).

grid icon

As part of the RStudio Preview Release, we’ve completely overhauled RStudio’s data viewer with modern features provided in part by a new interface built on DataTables.

No Row Limit

While the data viewer in 0.98 was limited to the first 1,000 rows, you can now view all the rows of your data set. RStudio loads just the portion of the data you’re looking at into the user interface, so things won’t get sluggish even when you’re working with large data sets.

no row limit

We’ve also added fixed column headers, and support for column labels imported from SPSS and other systems.

Sorting and Filtering

RStudio isn’t designed to act like a spreadsheet, but sometimes it’s helpful to do a quick sort or filter to get some idea of the data’s characteristics before moving into reproducible data analysis. Towards that end, we’ve built some basic sorting and filtering into the new data viewer.

Sorting

Click a column once to sort data in ascending order, and again to sort in descending order. For instance, how big is the biggest diamond?

sorting

To clear all sorts and filters on the data, click the upper-left column header.

Filtering

Click the new Filter button to enter Filter mode, then click the white filter value box to filter a column. You might, for instance, want to look at only at smaller diamonds:

filter

Not all data types can be filtered; at the moment, you can filter only numeric types, characters, and factors.

You can also stack filters; for instance, let’s further restrict this view to small diamonds with a Very Good cut:

filter factor

Full-Text Search

You can search the full text of your data frame using the new Search box in the upper right. This is useful for finding specific records; for instance, how many people named John were born in 2013?

full-text search

Live Update

If you invoke the data viewer on a variable as in View(mydata), the data viewer will (in most cases) automatically refresh whenever data in the variable changes.

You can use this feature to watch data change as you manipulate it. It continues to work even when the data viewer is popped out, a configuration that combines well with multi-monitor setups.

We hope these improvements help make you understand your data more quickly and easily. Try out the RStudio Preview Release and let us know what you think!

RStudio’s code editor includes a set of lightweight Vim key bindings. You can turn these on in Tools | Global Options | Code | Editing:

global options

For those not familiar, Vim is a popular text editor built to enable efficient text editing. It can take some practice and dedication to master Vim style editing but those who have done so typically swear by it. RStudio’s “vim mode” enables the use of many of the most common keyboard operations from Vim right inside RStudio.

As part of the 0.99 preview release, we’ve included an upgraded version of the ACE editor, which has a completely revamped Vim mode. This mode extends the range of Vim key bindings that are supported, and implements a number of Vim “power features” that go beyond basic text motions and editing. These include:

  • Vertical block selection via Ctrl + V. This integrates with the new multiple cursor support in ACE and allows you to type in multiple lines at once.
  • Macro playback and recording, using q{register} / @{register}.
  • Marks, which allow you drop markers in your source and jump back to them quickly later.
  • A selection of Ex commands, such as :wq and :%s that allow you to perform editor operations as you would in native Vim.
  • Fast in-file search with e.g. / and *, and support for JavaScript regular expressions.

We’ve also added a Vim quick reference card to the IDE that you can bring up at any time to show the supported key bindings. To see it, switch your editor to Vim mode (as described above) and type :help in Command mode.

vim quick reference card

Whether you’re a Vim novice or power user, we hope these improvements make the RStudio IDE’s editor a more productive and enjoyable environment for you. You can try the new Vim features out now by downloading the RStudio Preview Release.

We’re busy at work on the next version of RStudio (v0.99) and this week will be blogging about some of the noteworthy new features. If you want to try out any of the new features now you can do so by downloading the RStudio Preview Release.

The first feature to highlight is a fully revamped implementation of code completion for R. We’ve always supported a limited form of completion however (a) it only worked on objects in the global environment; and (b) it only worked when expressly requested via the tab key. As a result not nearly enough users discovered or benefitted from code completion. In this release code completion is much more comprehensive.

Smarter Completion Engine

Previously RStudio only completed variables that already existed in the global environment, now completion is done based on source code analysis so is provided even for objects that haven’t been fully evaluated:

document-inferred

Completions are also provided for a wide variety of specialized contexts including dimension names in [ and [[:

bracket

RStudio now provides completions for function arguments within function chains using magrittr’s %>% operator, for e.g. dplyr data transformation pipelines. Extending this behavior, we also provide the appropriate completions for the various ‘verbs’ used by dplyr:

dplyr        dplyr_verb

In addition, certain functions, such as library() and require(), expect package names for completions. RStudio automatically infers whether a particular function expects a package name and provides those names as completion results:

library

Completion is now also S3 and S4 aware. If RStudio is able to determine which method a particular function call will be dispatched to it will attempt to retrieve completions from that method. For example, the sort.default() method provides an extra argument, na.last, not available in the sort() generic. RStudio will provide completions for that argument if S3 dispatch would choose sort.default()

s3

Beyond what’s described above there are lots more new places where completions are provided:

  • For Shiny applications, completions for ui.R + server.R pairs
  • Completions for knitr options, e.g. in opts_chunk$get(), are now supplied
  • Completions for dynamic symbols within .C, .Call, .Fortran, .External

Additional Enhancements

Always On Completion

Previously RStudio only displayed completions “on-demand” in response to the tab key. Now, RStudio will proactively display completions after a $ or :: as well as after a period of typing inactivity. All of this behavior is configurable via the new completion options panel:

options

File Completions

When within an RStudio project, completions will be applied recursively to all file names matching the current token. The enclosing parent directory is printed on the right:

file

Fuzzy Narrowing

Got a completion with an excessively long name, perhaps a particularly long named Bioconductor package, or another variable or function name of long length? RStudio now uses ‘fuzzy narrowing’ on the completion list, by checking to see if the completion matches a ‘subsequence’ within each completion. By subsequence, we mean a sequence of characters not necessarily connected within the completion, so that for example, ‘fpse’ could match ‘file_path_sans_extension’. We hope that users will quickly become accustomed to this behavior and find it very useful.

fuzzy

Trying it Out

We think that the new completion features make for a qualitatively better experience of writing R code for beginning and expert users alike.  You can give the new features a try now by downloading the RStudio Preview Release.  If you run into problems or have feedback on how we could make things better let us know on our Support Forum.

 

As R users know, we’re continuously improving the RStudio IDE.  This includes RStudio Server Pro, where organizations who want to deploy the IDE at scale will find a growing set of features recently enhanced for them.

If you’re not already familiar with RStudio Server Pro here’s an updated summary page and a comparison to RStudio Server worth checking out. Or you can skip all of that and download a free 45 day evaluation right now!

WHAT’S NEW IN RSTUDIO SERVER PRO (v0.98.1091)

Naturally, the latest RStudio Server Pro has all of the new features found in the open source server version of the RStudio IDE. They include improvements to R Markdown document and Shiny app creation, making R package development easier, better debugging and source editing, and support for Internet Explorer 10 and 11 and RHEL 7.

Recently, we added even more powerful features exclusively for RStudio Server Pro:

  • Load balancing based on factors you control. Load balancing ensures R users are automatically assigned to the best available server in a cluster.
  • Flexible resource allocation by user or group. Now you can allocate cores, set scheduler priority, control the version(s) of R and enforce memory and CPU limits.
  • New security enhancements. Leverage PAM to issue Kerberos tickets, move Google Accounts support to OAuth 2.0, and allow administrators to disable access to various features.

For a full list of what’s changed in more depth, make sure to read the RStudio Server Pro admin guide.

THE RSTUDIO SERVER PRO BASICS

In addition to the newest features above there are many more that make RStudio Server Pro an upgrade to the open source IDE. Here’s a quick list:

  • An administrative dashboard that provides insight into active sessions, server health, and monitoring of system-wide and per-user performance and resources
  • Authentication using system accounts, ActiveDirectory, LDAP, or Google Accounts
  • Full support for the Pluggable Authentication Module (PAM)
  • HTTP enhancements add 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 for assistance and troubleshooting

That’s a lot to discover! Please download the newest version of RStudio Server Pro and as always let us know how it’s working and what else you’d like to see.

Give yourself the gift of “mastering” R to start 2015!

Join RStudio Chief Data Scientist Hadley Wickham at the Westin San Francisco on January 19 and 20 for this rare opportunity to learn from one of the R community’s most popular and innovative authors and package developers.

As of this post, the workshop is two-thirds sold out. If you’re in or near California and want to boost your R programming skills, this is Hadley’s only West Coast public workshop planned for 2015.

Register here: http://rstudio-sfbay.eventbrite.com/

We’re excited to announce a new release of Packrat, a tool for making R projects more isolated and reproducible by managing their package dependencies.

This release brings a number of exciting features to Packrat that significantly improve the user experience:

  • Automatic snapshots ensure that new packages installed in your project library are automatically tracked by Packrat.
  • Bundle and share your projects with packrat::bundle() and packrat::unbundle() — whether you want to freeze an analysis, or exchange it for collaboration with colleagues.
  • Packrat mode can now be turned on and off at will, allowing you to navigate between different Packrat projects in a single R session. Use packrat::on() to activate Packrat in the current directory, and packrat::off() to turn it off.
  • Local repositories (ie, directories containing R package sources) can now be specified for projects, allowing local source packages to be used in a Packrat project alongside CRAN, BioConductor and GitHub packages (see this and more with ?"packrat-options").

In addition, Packrat is now tightly integrated with the RStudio IDE, making it easier to manage project dependencies than ever. Download today’s RStudio IDE 0.98.978 release and try it out!

Packrat RStudio package pane integration

You can install the latest version of Packrat from GitHub with:

    devtools::install_github("rstudio/packrat")

Packrat will be coming to CRAN soon as well.

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

 

The RStudio team recently rolled out new capabilities in RStudio, shiny, ggvis, dplyr, knitr, R Markdown, and packrat. The “Essential Tools for Data Science with R” free webinar series is the perfect place to learn more about the power of these R packages from the authors themselves.

Click to learn more and register for one or more webinar sessions. You must register for each separately. If you miss a live webinar or want to review them, recorded versions will be available to registrants within 30 days.

The Grammar and Graphics of Data Science
Live! Wednesday, July 30 at 11am Eastern Time US  Click to register

  • dplyr: a grammar of data manipulation – Hadley Wickham
  • ggvis: Interactive graphics in R – Winston Chang

Reproducible Reporting 
Live! Wednesday, August 13 at 11am Eastern Time US  Click to register

  • The Next Generation of R Markdown – Jeff Allen
  • Knitr Ninja – Yihui Xie
  • Packrat – A Dependency Management System for R – J.J. Allaire & Kevin Ushey

Interactive Reporting
Live! Wednesday, September 3 at 11am Eastern Time US  Click to register

  • Embedding Shiny Apps in R Markdown documents – Garrett Grolemund
  • Shiny: R made interactive – Joe Cheng

 

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.

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.

Follow

Get every new post delivered to your Inbox.

Join 12,501 other followers