Avoiding potential unambiguity from namespace collisions for functions that come from libraries can be achieved by prepending the package name to the function call (e.g. dplyr::left_join
, plyr::left_join
etc), as explained here
How can this unambiguity be achieved for a user defined function? (i.e. one that did not come from a library/package). Obviously you cannot prepend the package name to a function if the function did not come from a package
Example
library(dplyr)
left_join <- function(x, y) { x + y }
dplyr::left_join(x,y) # Unambiguously calls left_join from dplyr
left_join(x, y) # Not clear whether from dplyr or user defined
How can user defined functions be called unambiguously?