Hello,

In Sections 5.8.1 and 5.8.2 of Writing R Extensions the following pattern is
suggested
for getting the path to a file in another package:

PKGB_PATH=‘echo ’library(packB); cat(system.file("libs", package="packB"))’
\
| ${R_HOME}/bin/R --vanilla --slave‘

Is the library(packB) really needed here? It is not needed on two systems
that
I have tested: Windows and Linux. What about MacOS?

If loading packB requires loading many other packages or doing expensive
initialization it would be much more efficient if we could omit
library(packB)
here.

On the other hand, keeping library(packB) has one possible advantage,
namely,
it may eliminate the need to add packB.dll to the loader's search path. So
there
is a trade-off of convenience vs efficiency.

Thanks,
Dominick

	[[alternative HTML version deleted]]

