<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/what-is-magrittrs-future-in-the-tidyverse/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.win-vector.com/blog/2017/07/what-is-magrittrs-future-in-the-tidyverse/"> R – Win-Vector Blog</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>For many <a rel="nofollow" href="https://cran.r-project.org/" target="_blank">R</a> users the <a rel="nofollow" href="https://cran.r-project.org/package=magrittr" target="_blank"><code>magrittr</code></a> pipe is a popular way to arrange computation and famously <a rel="nofollow" href="http://magrittr.tidyverse.org/" target="_blank">part of the <code>tidyverse</code></a>.</p>
<p><a rel="nofollow" href="http://magrittr.tidyverse.org/" target="_blank"><img border="0" src="https://i0.wp.com/www.win-vector.com/blog/wp-content/uploads/2017/07/NewImage.png?w=660" alt="NewImage" title="NewImage.png" data-recalc-dims="1"></a></p>
<p>The <code>tidyverse</code> itself is a rapidly evolving centrally controlled package collection. The <code>tidyverse</code> authors publicly appear to be interested in re-basing the <code>tidyverse</code> in terms of their new <a rel="nofollow" href="https://github.com/tidyverse/rlang" target="_blank"><code>rlang</code>/<code>tidyeval</code></a> package. So it is natural to wonder: what is the future of <code>magrittr</code> (a pre-<code>rlang</code>/<code>tidyeval</code> package) in the <code>tidyverse</code>?<span></span></p>
<p>
<p>For instance: <a rel="nofollow" href="https://gist.github.com/lionel-/10cd649b31f11512e4aea3b7a98fe381" target="_blank">here</a> is a draft of <code>rlang</code>/<code>tidyeval</code> based pipe (from one of the primary <code>rlang</code>/<code>tidyeval</code> authors). This pipe even fixes <a rel="nofollow" href="https://github.com/tidyverse/dplyr/issues/2726" target="_blank"><code>dplyr</code> issue 2726</a>:</p>
<pre>
# do NOT perform the source step directly!
# Instead, save and inspect the source code from:
#  https://gist.github.com/lionel-/10cd649b31f11512e4aea3b7a98fe381
# Output printed is the result of an example in the gist.
source(&quot;https://gist.githubusercontent.com/lionel-/10cd649b31f11512e4aea3b7a98fe381/raw/b8804e41424a4f721ce21292a7ec9c35b5f3689d/pipe.R&quot;)
#> List of 1
#>  $ :List of 1
#>   ..$ :List of 2
#>   .. ..$ : chr &quot;foo&quot;
#>   .. ..$ : chr &quot;foo&quot;

# previously throwing example from dplyr issue 2726
(function(x) mtcars %>% dplyr::select(!!enquo(x)))(disp) %>%
  head()
#>                   disp
#> Mazda RX4          160
#> Mazda RX4 Wag      160
#> Datsun 710         108
#> Hornet 4 Drive     258
#> Hornet Sportabout  360
#> Valiant            225
</pre>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://www.win-vector.com/blog/2017/07/what-is-magrittrs-future-in-the-tidyverse/"> R – Win-Vector 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/_xvZiE3UJEI" height="1"></a></div>