<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2. If my package already has a namespace named ernm, is an extra one wrapped around it, so that extending packages would have to use ernm::ernm::bar()?<br>
</blockquote><div><br></div><div>No, the generated header file for a package exports functions within the package namespace but that doesn't preclude other headers from exporting other types in the same namespace. </div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">3. Just to be clear… this removes the need to make an inline plug-in because you can just use cppFunction(depends="<u></u>MyPacakge",…) with no additional glue except for the interface statement. </blockquote>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
quite the opposite, // [[Rcpp::depends("myPackage")]] uses the inline plugin as a way to gather information about includes, libraries, ... you need it.<br></blockquote><div><br></div><div>A clarification here: if your package exposes a header-only interface then Rcpp::depends will take care of adding your package's include directory to the sourceCpp compilation (but users of course still need to do e.g. #include <ernm.h>). For this scenario no inline plugin is needed.</div>
<div><br></div><div>However, for cppFunction it's not enough to just add the include path, we also need the header(s). For that case you should create a simple inline plugiln (which you can likely create with a one-liner by calling Rcpp.plugin.maker).</div>
<div><br></div><div> </div></div>