rpackagesearch-pathname-collision

How to unmask a function in R, due to name collisions on searchpath


When I loaded package debug to debug a script with zoo objects, I got trouble: function index from zoo got masked by debug package. How can I unmask index? In general, how to deal with these name colliding problems? We just do not use debug package with `zoo'?


Solution

  • Exported symbols are always identifiable with the :: operator:

    zoo::index
    

    Hidden functions not declared in the namespace can still be accessed using ::: (triple-colon), and example would be

    zoo:::.onLoad
    

    which you can see even though it is not exported.