Re: [R] Risks of using "function <- package::function" ?

2017-11-17 Thread Duncan Murdoch
On 17/11/2017 2:30 AM, Jeff Newmiller wrote: Obvious? How about "obscurity"? Just directly use pkg::fun if you have name collision. One disadvantage of this is that the availability of pkg may not be checked until you use it. Package checks will complain if you haven't declared in the

Re: [R] Risks of using "function <- package::function" ?

2017-11-17 Thread Eric Berger
As Jeff recommends, I use the pkg::fun for clarity. However I probably use it more than needed (e.g. I use the dplyr:: prefix on all dplyr function calls instead of just the functions with name collisions). Are there any tools that can be used (like a form of lint) to identify uses of functions

Re: [R] Risks of using "function <- package::function" ?

2017-11-16 Thread Jeff Newmiller
Obvious? How about "obscurity"? Just directly use pkg::fun if you have name collision. -- Sent from my phone. Please excuse my brevity. On November 16, 2017 4:46:15 PM PST, Duncan Murdoch wrote: >On 16/11/2017 4:53 PM, Boris Steipe wrote: >> Large packages

Re: [R] Risks of using "function <- package::function" ?

2017-11-16 Thread Duncan Murdoch
On 16/11/2017 4:53 PM, Boris Steipe wrote: Large packages sometimes mask each other's functions and that creates a headache, especially for teaching code, since function signatures may depend on which order packages were loaded in. One of my students proposed using the idiom <- :: ... in

[R] Risks of using "function <- package::function" ?

2017-11-16 Thread Boris Steipe
Large packages sometimes mask each other's functions and that creates a headache, especially for teaching code, since function signatures may depend on which order packages were loaded in. One of my students proposed using the idiom <- :: ... in a preamble, when we use just a small subset