Managing Search Path Conflicts in R 3.6.0: Lazy Method Attachment into Search Path

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Managing Search Path Conflicts in R 3.6.0: Lazy Method Attachment into Search Path

Juan Telleria Ruiz de Aguirre
Dear R Developers,

R 3.6.0 is going to introduce new features for managing search path
conflicts, explained in greater detail in the following article, and which
are greatly welcome:

https://developer.r-project.org/Blog/public/2019/03/19/managing-search-path-conflicts/index.html

In addition, another Conflict Policy could also be adopted, which I will
call "Lazy Method Attachment into the Search Path", understood as:

* All non-conflicting methods are always attached into the Search path.
* If a conflict occurs, method for a specific class object, is not
attached, unless you are going to use it, and then the user is asked in the
command prompt if you want it attached or not.

For example, if I set:

options(conflict.policy = "ask")

library(dplyr)
# All works fine.

df %>%
select(col1, col2)
# Works.

df %>%
filter(col1 == "a")
#> Do you want to attach data.frame.filter Method? y/n?

This approach would be great for dynamic programming and R Scripting, and
lay somewhere between R Core / @Luke Tierney's approach and "conflicted"
package.

Thank you!

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel