Does R support multi-level namespaces?

Is it possible to have a function in R under several levels of namespaces?

For example, can these functions exist?

 Mymath::Trig::cosine( ) A::B::C::D::foo( ) 
+5
source share
1 answer

I donโ€™t think so, because the parser does not even cope with this syntax: a::b::c gives

Error: unexpected '::' in "a :: b ::"

ie, we didnโ€™t even get to finding things in the namespace. In contrast, a::b gives

Error in loadNamespace (name): no package named 'a

+2
source

Source: https://habr.com/ru/post/1269984/


All Articles