<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/future-1-8-0-preparing-for-a-shiny-future/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://www.jottr.org/2018/04/12/future-results/"> JottR on R</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><strong><a rel="nofollow" href="https://cran.r-project.org/package=future" target="_blank">future</a></strong> 1.8.0 is available on CRAN.</p>
<p>This release lays the foundation for being able to capture outputs from futures, perform automated timing and memory benchmarking (profiling) on futures, and more. These features are <em>not</em> yet available out of the box, but thanks to this release we will be able to make some headway on many of <a rel="nofollow" href="https://github.com/HenrikBengtsson/future/issues/172" target="_blank">the feature requests related to this</a> – hopefully already by the next release.</p>
<p><img src="https://i0.wp.com/www.jottr.org/post/retro-shiny-future-small.png?w=456&ssl=1" alt="" data-recalc-dims="1"></p>
<p>For <strong>shiny</strong> users following Joe Cheng’s efforts on extending <a rel="nofollow" href="https://rstudio.github.io/promises/articles/shiny.html" target="_blank">Shiny with asynchronous processing using futures</a>, <strong>future</strong> 1.8.0 comes with some <a rel="nofollow" href="https://github.com/HenrikBengtsson/future/issues/200" target="_blank">important updates/bug fixes</a> that allow for consistent error handling regardless whether Shiny runs with or without futures and regardless of the future backend used. With previous versions of the <strong>future</strong> package, you would receive errors of different classes depending on which future backend was used.</p>
<p>The <code>future_lapply()</code> function was moved to the <strong><a rel="nofollow" href="https://cran.r-project.org/package=future.apply" target="_blank">future.apply</a></strong> package back in January 2018. Please use that one instead, especially since the one in the <strong>future</strong> package is now formally deprecated (and produces a warning if used). In <strong>future.apply</strong> there is also a <code>future_sapply()</code> function and hopefully, in a not too far future, we’ll see additional futurized versions of other base R apply functions, e.g. <code>future_vapply()</code> and <code>future_apply()</code>.</p>
<p>Finally, with this release, there was an bug fix related to <em>nested futures</em> (where you call <code>future()</code> within a <code>future()</code> – or use <code>%&lt;-%</code> within another <code>%&lt;-%</code>). When using non-standard evaluation (NSE) such as <strong>dplyr</strong> expressions in a nested future, you could get a false error that complained about not being able to identify a global variable when it actually was a column in a data.frame.</p>
<h2>What’s next?</h2>
<ul>
<li>
<p>I’m giving a presentation on futures at the <a rel="nofollow" href="https://2018.erum.io/" target="_blank">eRum 2018 conference taking place on May 14-16, 2018 in Budapest</a>. I’m excited about this opportunity and to meet more folks in the European R community.</p>
</li>
<li>
<p>I’m happy to announce that The Infrastructure Steering Committee of The R Consortium is funding the project <a rel="nofollow" href="https://www.r-consortium.org/projects/awarded-projects" target="_blank">Future Minimal API: Specification with Backend Conformance Test Suite</a>. I’m grateful for their support. The aim is to formalize the Future API further and to provide a standardized test suite that packages implementing future backends can validate their implementations against. This will benefit the quality of higher-level parallel frameworks that utilize futures internally, e.g. <strong><a rel="nofollow" href="https://cran.r-project.org/package=future.apply" target="_blank">future.apply</a></strong> and <strong>foreach</strong> with <strong><a rel="nofollow" href="https://cran.r-project.org/package=doFuture" target="_blank">doFuture</a></strong>. It will also help moving forward on several of <a rel="nofollow" href="https://github.com/HenrikBengtsson/future/issues/172" target="_blank">the feature requests received from the community</a>.</p>
</li>
</ul>
<h2>Help shape the future</h2>
<p>If you find futures useful in your R-related work, please consider sharing your stories, e.g. by blogging, on <a rel="nofollow" href="https://twitter.com/henrikbengtsson" target="_blank">Twitter</a>, or on <a rel="nofollow" href="https://github.com/HenrikBengtsson/future" target="_blank">GitHub</a>. It always exciting to hear about how people are using them or how they’d like to use. I know there are so many great ideas out there!</p>
<p>Happy futuring!</p>
<h2>Links</h2>
<ul>
<li>future package: <a rel="nofollow" href="https://cran.r-project.org/package=future" target="_blank">CRAN</a>, <a rel="nofollow" href="https://github.com/HenrikBengtsson/future" target="_blank">GitHub</a></li>
<li>future.batchtools package: <a rel="nofollow" href="https://cran.r-project.org/package=future.batchtools" target="_blank">CRAN</a>, <a rel="nofollow" href="https://github.com/HenrikBengtsson/future.batchtools" target="_blank">GitHub</a></li>
<li>future.callr package: <a rel="nofollow" href="https://cran.r-project.org/package=future.callr" target="_blank">CRAN</a>, <a rel="nofollow" href="https://github.com/HenrikBengtsson/future.callr" target="_blank">GitHub</a></li>
<li>doFuture package: <a rel="nofollow" href="https://cran.r-project.org/package=doFuture" target="_blank">CRAN</a>, <a rel="nofollow" href="https://github.com/HenrikBengtsson/doFuture" target="_blank">GitHub</a> (a <a rel="nofollow" href="https://cran.r-project.org/package=foreach" target="_blank">foreach</a> adaptor)</li>
</ul>
	<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://www.jottr.org/2018/04/12/future-results/"> JottR on R</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/X1Bohvd--2o" height="1"></a></div>