<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/rstudio-v1-1-the-little-things/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://blog.rstudio.com/2017/09/13/rstudio-v1.1---the-little-things/"> RStudio Blog</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><em>Today, we’re concluding our blog series on new features in RStudio 1.1. If you’d like to try these features out for yourself, you can download a <a rel="nofollow" href="https://www.rstudio.com/products/rstudio/download/preview/" target="_blank">preview release of RStudio 1.1</a>.</em></p>
<h2>Details matter</h2>
<p>Throughout this blog series, we’ve focused on some of the big features we added in RStudio 1.1. It’s not just the big things that matter, though; it’s sometimes the little ones that make the most difference in your day-to-day work. Towards that end, we spent a chunk of time during RStudio 1.1’s development implementing small but significant improvements to the core IDE features you use every day. Many of these were based on requests and ideas from the R community – we’re very thankful for everyone’s input and perspective!</p>
<h3>Create Git branches</h3>
<p>We’ve significantly improved Git branch management. Now you can add a new branch right from the IDE, and set it up to track a remote branch at the same time.</p>
<p><img alt="New branch" src="https://i1.wp.com/blog.rstudio.com/images/2017-09-13-new-branch.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>You can even type to search your branch names, which is helpful if you have a lot of them!</p>
<p><img alt="Search branches" src="https://i0.wp.com/blog.rstudio.com/images/2017-09-13-search-branches.png?w=456&ssl=1" data-recalc-dims="1"></p>
<h3>Ctrl+R command search</h3>
<p>Regular RStudio users will know that <em>Ctrl+Up</em> (or <em>Cmd+Up</em> on MacOS) lets you recall a previous R command by typing only a few letters from the beginning of the command. In RStudio 1.1, we’ve added <em>Ctrl+R</em>, which–just like in your favorite shell–performs an incremental history search. Now you can recall a previous R command based on text anywhere in the command, not just at the beginning.</p>
<p><img alt="Reverse history search" src="https://i1.wp.com/blog.rstudio.com/images/2017-09-13-ctrl-r.png?w=456&ssl=1" data-recalc-dims="1"></p>
<h3>Change knit directory</h3>
<p>In RStudio 1.0, knitting R Markdown documents (and executing notebook chunks) was always done in the context of the document’s directory. This has some advantages, but many people prefer to use more contextual paths. In RStudio 1.1, you can now choose to evaluate chunks in the current working directory, or in the directory of the document’s project.</p>
<p><img alt="Choose knit directory" src="https://i1.wp.com/blog.rstudio.com/images/2017-09-13-knit-directory.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>This setting can be different for each R Markdown document, and it affects both the execution of notebook chunks and the behavior of the Knit button, so you’ll get consistent results no matter how your R chunks are evaluated.</p>
<h3>Run R code between blank lines</h3>
<p>In older versions of RStudio, <em>Ctrl+Enter</em> sent a single line of R code to the console. In 1.0, we added the ability to automatically send an entire R statement to the console, even if it was spread over multiple lines. And in 1.1, we’ve made it possible to execute consecutive R lines, delimited by blank lines (like “paragraphs” in <a rel="nofollow" href="https://ess.r-project.org/" target="_blank">ESS</a>). You can opt into this behavior in Options -> Code -> Editing -> Execution:</p>
<p><img alt="Multiple consecutive R lines" src="https://i2.wp.com/blog.rstudio.com/images/2017-09-13-consecutive-lines.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>This behavior is helpful if you use blank lines to delimit sections of your R script, and usually want to execute each section as a unit. For instance, in the example below you would press Ctrl+Enter once to execute the first section, and again to execute the second.</p>
<pre><code># Let's run these two commands to build some data.
categories &lt;- c(&quot;first&quot;, &quot;second&quot;)
data &lt;- data.frame(
  group   = factor(categories),
  measure = c(40, 60))

# Then, this last one to view it.
ggplot(data = data, aes(group, measure), geom_bar(stat = &quot;identity&quot;))
</code></pre>
<p>It’s also possible to mix and match execution styles, as we’ve added new commands that specifically use each style (regardless of the default behavior of Ctrl+Enter). Set Ctrl+Enter to your most-used style and bind keyboard shortcuts to the others you use; you’ll rarely find yourself reaching for the mouse to execute R code!</p>
<h3>Data viewer improvements</h3>
<p>We have removed the 100-column limit in the data viewer. We’ve also made it possible to resize the columns, so you can see more of your data when it contains long text.</p>
<p><img alt="Data viewer columns" src="https://i0.wp.com/blog.rstudio.com/images/2017-09-13-resize-columns.png?w=456&ssl=1" data-recalc-dims="1"></p>
<h3>Execute code from Help</h3>
<p>Ever wanted to execute the example code from a function’s Help? Now you can just highlight it right in the Help pane and press Ctrl+Enter (Cmd+Enter on macOS) to send it to the console.</p>
<p><img alt="Help code execution" src="https://i0.wp.com/blog.rstudio.com/images/2017-09-13-execute-help.png?w=456&ssl=1" data-recalc-dims="1"></p>
<h3>Project templates</h3>
<p>Any R package can now supply RStudio with a template for new projects based on the package. For instance, when you install the <a rel="nofollow" href="https://bookdown.org/yihui/bookdown/" target="_blank">bookdown</a> package, you’ll start seeing an option for new <strong>bookdown</strong> projects in RStudio, which will get you started with the skeleton of a book right away.</p>
<p><img alt="R project templates" src="https://i2.wp.com/blog.rstudio.com/images/2017-09-13-project-templates.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>This project template isn’t hard-coded into RStudio – it’s provided by the R package, so any package can provide a project template. If you’re a package author, see our <a rel="nofollow" href="https://rstudio.github.io/rstudio-extensions/rstudio_project_templates.html" target="_blank">RStudio Project Templates</a> documentation for information on how to add a project template to your package.</p>
<h3>Ligature support</h3>
<p>In the last few years we’ve seen an uptick in fonts designed specifically for code. <a rel="nofollow" href="https://www.hanselman.com/blog/MonospacedProgrammingFontsWithLigatures.aspx" target="_blank">Many of these use “ligatures”</a>, which combine two or more individual characters into a single typographical glyph (see <a rel="nofollow" href="https://github.com/tonsky/FiraCode" target="_blank">Fira Code</a> for examples). RStudio Server and RStudio on MacOS have always supported these natively; in RStudio 1.1 we added support for them on Windows and Linux, too.</p>
<p><img alt="Ligatures in Fira Code on Windows" src="https://i0.wp.com/blog.rstudio.com/images/2017-09-13-ligatures.png?w=456&ssl=1" data-recalc-dims="1"></p>
<h3>Files pane ergonomics</h3>
<p>The <em>Copy</em> command in the Files pane makes it easy to copy a file from one place to another, but sometimes you want the file to have a different name in the new location. We’ve added a new command called <em>Copy To…</em> which does this: just like <code>cp</code>, you can now specify a destination filename.</p>
<p><img alt="Copy To" src="https://i0.wp.com/blog.rstudio.com/images/2017-09-13-files-pane.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>We’ve also significantly improved <em>Rename</em>: when you use the Files pane to rename a file that you have open, it’s no longer necessary to close and re-open the file; the editor buffer adapts immediately to the new name.</p>
<h3>ANSI colors in the R console</h3>
<p>R packages like <a rel="nofollow" href="https://cran.r-project.org/web/packages/crayon/index.html" target="_blank">crayon</a> make it possible for R’s output to include colors and highlighting, using standard ANSI escape sequences. We’ve added support for these to RStudio’s R console; packages that use <em>crayon</em>, like <a rel="nofollow" href="https://cran.r-project.org/web/packages/diffobj/index.html" target="_blank">diffobj</a>, can now emit colored, styled text right inside the R console.</p>
<p><img alt="ANSI colors in R" src="https://i1.wp.com/blog.rstudio.com/images/2017-09-13-crayon.png?w=456&ssl=1" data-recalc-dims="1"></p>
<h2>Conclusion</h2>
<p>This wraps up our blog series on the RStudio 1.1 preview. If you just can’t get enough, there’s lots more: see the <a rel="nofollow" href="https://www.rstudio.com/products/rstudio/download/preview-release-notes/" target="_blank">RStudio 1.1 Preview Release Notes</a> for a full list of the changes in RStudio 1.1.</p>
<p>If you’d like to learn more, we have two upcoming webinars in which we’ll be taking a deeper dive:</p>
<ul>
<li><strong>New Features of the IDE</strong> on December 6th, 2017: we’ll show you what’s new in RStudio 1.1 and walk you through how to apply the new features to your workflow.</li>
<li><strong>Terminal Updates</strong> on December 20th, 2017: we’ll get into the details of the new RStudio 1.1 Terminal.</li>
</ul>
<p>We hope you’ve enjoyed learning about the new features and capabilities ahead of the official release of RStudio 1.1, and we look forward to putting an official release in your hands in the coming months.</p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://blog.rstudio.com/2017/09/13/rstudio-v1.1---the-little-things/"> RStudio Blog</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/dsg6_Yl-C_g" height="1"></a></div>