« R in the Windows Subsystem for Linux | Main | Because it's Friday: Editing Star Wars »

December 14, 2017


Feed You can follow this conversation by subscribing to the comment feed for this post.

Thanks the gods - I dread building functions with dplyr as I have read and reread the 'programming with dplyr' vignette and still don't understand how I'm supposed to pass/evaluate values into custom functions. Given the large number of blog posts trying to explain NSE in the tidyverse it should be taken as a strong sign it’s a step backwards for a large number of users.

If Hong Ooi is reading this, read this please make a seplyrxdf package :P

I agree Serban. I love dplyr for small projects but it just doesn't seem like learning the "Nonstandards" with logic that is hard to apply elsewhere. it's like voluntaringly fencing yourself in. I'm not an expert programmer, but even I am seeing the limitations of dplyrs NSE as soon as I go into parametric programming.

Not to say I don't like the tidyverse. I love it. Some of the basic design choice are just very hindering when using it.

How do you plan on dealing with filter, where the clause is not assignment ("=") but and actual filtering clause ("==")? I would much rather see dplyr upgraded than deal with more syntactic sugar, for what it's worth.

The new qe() (quote expression) method seems to help with filter() (please see below). I'd love to see changes to dplyr, but I don't make those decisions.

#> Loading required package: wrapr

datasets::iris %.>%
qe(Sepal.Length == 5,
Petal.Length > 2))
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1 5 2.0 3.5 1 versicolor
#> 2 5 2.3 3.3 1 versicolor

Very interesting blog. I am a heavy user of the tidyverse, and agree that using dplyr programatically is difficult to grasp at first. The need to work with quosures and unquoting seems more like an incantation than transparent code development.

And I believe that you have put your finger on a common workflow: pass a dplyr verb a vector of strings and have those strings transparently interpreted as column names. Many of us want to do that in a painless way.

I will give your packages a test run.

The comments to this entry are closed.

Search Revolutions Blog

Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid
Get this blog via email with Blogtrottr