在R中,“通过命名空间(而不是附加的)加载"的内容是什么?意思是? [英] In R, what does "loaded via a namespace (and not attached)" mean?

查看:121
本文介绍了在R中,“通过命名空间(而不是附加的)加载"的内容是什么?意思是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在R中,在sessionInfo()通过名称空间(而不附加)加载""包是什么意思?

In R, what does it mean for a package to be "loaded via a namespace (and not attached)" in sessionInfo()?

修改:

例如:

> sessionInfo()

R version 2.15.2 (2012-10-26)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

---->>>> loaded via a namespace (and not attached):
---->>>> [1] tools_2.15.2

推荐答案

这意味着程序包(在这种情况下为R)可以访问程序包的功能/对象,但是用户不能不将工具包显式地加载为stats,图形等已加载,可供用户使用.

It means the package (In this case R) can access the package functions/objects, but the user can not without explicitly loading the tools package where as stats, graphics, etc. are loaded and ready to go for the user.

这是一个例子:

sessionInfo()
file_ext("file.com")
tools::file_ext("file.com")
sessionInfo()

这篇关于在R中,“通过命名空间(而不是附加的)加载"的内容是什么?意思是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆