Hello,<br><br>In Sections 5.8.1 and 5.8.2 of Writing R Extensions the following pattern is suggested<br>for getting the path to a file in another package:<br><br>PKGB_PATH=‘echo ’library(packB); cat(system.file(&quot;libs&quot;, package=&quot;packB&quot;))’ \<br>
| ${R_HOME}/bin/R --vanilla --slave‘<br><br>Is the library(packB) really needed here? It is not needed on two systems that<br>I have tested: Windows and Linux. What about MacOS?<br><br>If loading packB requires loading many other packages or doing expensive<br>
initialization it would be much more efficient if we could omit library(packB)<br>here.<br><br>On the other hand, keeping library(packB) has one possible advantage, namely,<br>it may eliminate the need to add packB.dll to the loader&#39;s search path. So there<br>
is a trade-off of convenience vs efficiency.<br><br>Thanks,<br>Dominick<br><br>