list of masked functions in R

前端 未结 1 1680
没有蜡笔的小新
没有蜡笔的小新 2020-12-03 01:59

I use a lot of packages and I know some functions are masked because they exist in several different packages. Is there a way to get the list of duplicate functions (or mask

相关标签:
1条回答
  • 2020-12-03 02:35

    in R base:

     conflicts(detail=TRUE)
    

    And to find the list of environments that contain a version of

    getAnywhere(x = "functionA")
    

    Note: getAnywhere also finds the functions which are not exported. and that are hence not creating conflicts.

    A better (simpler) result could be obtained using:

    x = "functionA"
    names(which(sapply(search(), FUN = function(env) exists(x, env, inherits = FALSE, mode = "function"))))
    
    0 讨论(0)
提交回复
热议问题