This post is part of a series on new features in RStudio 1.4, currently available as a preview release.
If you write R scripts longer than a couple of pages, you probably already use RStudio’s document outline pane, which makes it easy to see an overview of your R script and navigate quickly to any section. To make it easier to navigate in longer and more nested scripts, we’ve added support for subsections in the outline.
Add subsections to your code by using Markdown-style comment headers, with the label followed by four or more dashes. For example:
# Section ---- ## Subsection ---- ### Sub-subsection ----
More information on code sections can be found on our help site: Code Folding and Sections.
If you have a mouse with side buttons, you can now use them to jump backwards and forwards through your source history (recent editing locations).
AGG (Anti-Grain Geometry) is a high-performance, high-quality 2D drawing library. RStudio 1.4 integrates with a new AGG-powered graphics device provided by the ragg R package to render plots and other graphical output from R. It’s faster than the one built into R, and it does a better job of rendering fonts and anti-aliasing. Its output also is very consistent, no matter where you run your R code.
To start using this new device, go to Options -> General -> Graphics -> Backend and select “AGG”.
If you primarily use the keyboard to navigate the IDE, we’ve introduced a couple of new tools that will make it easier to move around. Check Options -> Accessibility -> Highlight Focused Panel and RStudio will draw a subtle dotted border around the part of the IDE that has focus. For example, when your cursor is in the Console panel:
We’ve also added a new keyboard shortcut, F6, which moves focus to the next panel. Using these together makes it much easier to move through the IDE without the mouse!
Do you find yourself giving your R scripts names like
step_001.R so that they are sorted correctly in the Files pane? It’s no longer necessary: RStudio 1.4 uses natural sort order instead of alphabetical sort order for the Files pane, so that
step10.R comes after
step9.R, not after
(See also Jenny Bryan’s advice on naming things.)
Grouping data is a very useful operation, but it isn’t always obvious how data has been grouped. R Notebooks now show you information about grouping when displaying data:
RStudio Desktop can use any font you have installed on your system, but if you use RStudio Server you’ve always been stuck with the default. No longer! RStudio Server can now use popular coding fonts like Fira Code, Source Code Pro, and JetBrains Mono.
These fonts can even be installed on the server itself so it isn’t necessary to have them installed on the Web browser you use to access RStudio Server.
You can try out all these features by installing the RStudio 1.4 Preview Release. If you do, we welcome your feedback on the community forum. We look forward to getting a stable release of RStudio 1.4 in your hands soon!
Marcin Dubel from Appsilon shares key considerations for creating an award-winning Shiny application.
RStudio Connect allows you to easily share your Shiny apps with push-button publishing, while maintaining enterprise-level security and tuning resources to meet the demands of your application.