可以参见:
我们可以通过:: 访问包中的函数和内容(必须得是export 给使用者的),如果想要访问全部的内容,可以使用::: 。
对于不确定来源的对象(包括方法),我们可以使用:
> getAnywhere(x)
A single object matching 'x' was found
It was found in the following places
.GlobalEnv
with value
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
> getAnywhere(read.maf)
no object named 'read.maf' was found
> getAnywhere(summary)
2 differing objects matching 'summary' were found
in the following places
package:base
namespace:DBI
namespace:base
Use [] to view one of them
> getAnywhere(summary)[1]
function (object, ...)
UseMethod("summary")
<bytecode: 0x7f9429c59c70>
<environment: namespace:base>