3 ms·
As a very frequent R user, I actually find non-standard evaluation to be more hassle than good in most situations. If you want to program with most of the tidy
by bransonf 7y ago
As a very frequent R user, I actually find non-standard evaluation to be more hassle than good in most situations.
If you want to program with most of the tidyverse libraries, you are forced to implement a bunch of non-sense into your function to properly evaluate arguments within a function. Sure, NSE may be useful in some circumstances, but more often than not, it just increases the likelihood of introducing a bug.
Especially for new programmers, NSE is a huge leap and very confusing.
The old solution was exporting underscore ie: ‘mutate_()’ suffixed functions that used standard evaluation. And this was fine. But, then RStudio decides to deprecate these functions and force NSE on users. I’m not happy about that, and I often avoid using libraries like dplyr when writing functions so that I don’t have to deal with it.
- meanmrmustard92 7y agoAgreed. Recent updates to rlang have made programming dplyr/ggplot2 functions a bit better, but it still feels super clunky. I use data.table for most things for programmability and speed reasons. As much as I like ggplot2, I find the rest of the tidyverse to be solving problems it invents (e.g. quosures to fix the problem of not permitting string arguments for dplyr verbs) and monopolising an open source ecosystem.
- lottin 7y agoI steer clear of tidyverse as well. At some point I used to like ggplot but this is because I didn't know lattice yet. lattice is a lot like ggplot but it doesn't come with "strings attached" and the plots look a little nicer.
- wodenokoto 7y agoI struggle to find the logic in the data.table interface, whereas dplyr is a joy to use, at least interactive. I agree that it is slow, and when things break apart, heavy the NSE use in dplyr really comes back to bite you.
- naiveprogrammer 7y agoSame. The moment I felt that my brain was melting over NSE and dplyr was the moment I started to phase out most tidyverse stuff from my work. I've switched to data.table and plain R for most of my stuff now.