Is it a good practice to call functions in a package via ::

It all depends on context. :: is primarily necessary if there are namespace collisions, functions from different packages with the same name. When I load the dplyr package, it provides a function filter, which collides with (and masks) the filter function loaded by default in the stats package. So if I want to use the … Read more

How do you use “

<<- is most useful in conjunction with closures to maintain state. Here’s a section from a recent paper of mine: A closure is a function written by another function. Closures are so-called because they enclose the environment of the parent function, and can access all variables and parameters in that function. This is useful because … Read more