MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / namespace_env

Function namespace_env

inst/include/Rcpp/Environment.h:341–352  ·  view source on GitHub ↗

* @param name the name of the package of which we want the namespace * * @return the namespace of the package * * @throw no_such_namespace */

Source from the content-addressed store, hash-verified

339 * @throw no_such_namespace
340 */
341 static Environment_Impl namespace_env(const std::string& package){
342 Armor<SEXP> env ;
343 try{
344 SEXP getNamespaceSym = Rf_install("getNamespace");
345 Shield<SEXP> package_str( Rf_mkString(package.c_str()) );
346 Shield<SEXP> call( Rf_lang2(getNamespaceSym, package_str) );
347 env = Rcpp_fast_eval(call, R_GlobalEnv);
348 } catch( ... ){
349 throw no_such_namespace( package ) ;
350 }
351 return Environment_Impl( env ) ;
352 }
353
354 /**
355 * The parent environment of this environment

Callers 10

function_namespace_envFunction · 0.85
runit_namespaceFunction · 0.85
unwound_tMethod · 0.85
unwound_tMethod · 0.85
parseSourceDependenciesFunction · 0.85
writeEndMethod · 0.85
checkRSignatureFunction · 0.85
uniqueTokenMethod · 0.85
dynlibCacheInsertFunction · 0.85
dynlibCacheLookupFunction · 0.85

Calls 2

Rcpp_fast_evalFunction · 0.85
Environment_ImplFunction · 0.85

Tested by

no test coverage detected