可以参见:

    07. 环境

    08. R 的面向对象

    我们可以通过:: 访问包中的函数和内容(必须得是export 给使用者的),如果想要访问全部的内容,可以使用::: 。

    对于不确定来源的对象(包括方法),我们可以使用:

    1. > getAnywhere(x)
    2. A single object matching 'x' was found
    3. It was found in the following places
    4. .GlobalEnv
    5. with value
    6. [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
    7. > getAnywhere(read.maf)
    8. no object named 'read.maf' was found
    9. > getAnywhere(summary)
    10. 2 differing objects matching 'summary' were found
    11. in the following places
    12. package:base
    13. namespace:DBI
    14. namespace:base
    15. Use [] to view one of them
    16. > getAnywhere(summary)[1]
    17. function (object, ...)
    18. UseMethod("summary")
    19. <bytecode: 0x7f9429c59c70>
    20. <environment: namespace:base>