I am working in a legacy codebase where someone has code like this at the start:
library(purrr)
library(rlang)
library(lazyeval)
I have used purrr
before, but have never used rlang
or lazyeval
. I have heard of "Non-Standard Evaluation" before, and maybe used it once or twice, but am far from fluent with it.
My main question / concern is that these 3 packages seem to define many functions with the same name. So when the script runs you get a lot of "function x masks the same function in another package warning". It it easy to see this with the conflicted
package:
library(rlang)
library(purrr)
library(lazyeval)
library(conflicted)
conflict_scout()
31 conflicts:
* `%@%` : purrr, rlang
* `as_function` : purrr, rlang
* `as_name` : lazyeval, rlang
* `call_modify` : lazyeval, rlang
* `call_standardise`: lazyeval, rlang
* `expr_label` : lazyeval, rlang
* `expr_text` : lazyeval, rlang
* `f_env` : lazyeval, rlang
* `f_env<-` : lazyeval, rlang
* `f_label` : lazyeval, rlang
* `f_lhs` : lazyeval, rlang
* `f_lhs<-` : lazyeval, rlang
* `f_rhs` : lazyeval, rlang
* `f_rhs<-` : lazyeval, rlang
* `f_text` : lazyeval, rlang
* `flatten` : purrr, rlang
* `flatten_chr` : purrr, rlang
* `flatten_dbl` : purrr, rlang
* `flatten_int` : purrr, rlang
* `flatten_lgl` : purrr, rlang
* `flatten_raw` : purrr, rlang
* `invoke` : purrr, rlang
* `is_atomic` : lazyeval, rlang
* `is_call` : lazyeval, rlang
* `is_formula` : lazyeval, rlang
* `is_lang` : lazyeval, rlang
* `list_along` : purrr, rlang
* `missing_arg` : lazyeval, rlang
* `modify` : purrr, rlang
* `prepend` : purrr, rlang
* `splice` : purrr, rlang
Can someone please tell me why there are so many conflicts between these packages? Was one of them intended to replace / supercede the others?
Thanks.
(Note: My actual situation is somewhat different than this. I am using a suite of in-house R packages that cumulatively Depend
on each of these packages. But I think that the end result is the same.)