Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法列出包导出的对象,而不实际附加它?我试过
ls(loadNamespace("ggplot2"))
但是,这显示了此包中所有已定义和导入的对象。相反,我只想看到导出的名称。即我想要的结果
library(ggplot2) ls("package:ggplot2")
但实际上没有将包附加到我的搜索路径。
您可以使用记录在案getNamespaceExports("ggplot2")的 .
getNamespaceExports("ggplot2")
啊找到了。无证
ls(getNamespaceInfo(mynamespace, "exports"));
似乎可以解决问题。