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.
如何加载一个包但不将它导出的所有内容放入“主命名空间”?
library(myPackage) # exports myVar myVar # This works, but I want it not to work myPackage::myVar # This works, and I do want it to work
对于访问包中的导出变量,::就足够了。您无需加载包即可使用此语法。正如?":::"详细信息部分的第一段所指出的,@csgillespie 建议的三重冒号旨在检查未由包导出的内部变量。
::
?":::"
我需要在每个之前添加一个空格
<a
如果还没有空格,则在带有 php 的字符串中。
所以这
hello world <a
应该保持原样
但是这个
hello world<a