R Package Compiled Code Library Dependencies (on Unix-alikes)
List some system level information about the compiled code library,
typically its dependencies, for R packages with compiled code; for
Unix-alikes or more generally when cmd
is installed locally.
pkgLibs(pkg, cmd = if(Sys.info()[["sysname"]] == "Darwin") "otool -L" else "ldd")
pkg |
|
cmd |
a |
Note that there seems some language confusion as “DLL” on Windows is also used for “Dynamic-link Library” and Wikipedia warns about confusing the two concepts (“dynamically loaded ..” vs “dynamic-link ..”).
The exact structure of such entries is currently subject to change and you should not rely on its exact format for now.
Martin Maechler
‘Dynamic Loading’ on Wikipedia, https://en.wikipedia.org/wiki/Dynamic_loading
On Windows, “DLL” is also used for Dynamic-link library, https://en.wikipedia.org/wiki/Dynamic-link_library.
man ldd
from a terminal on a valid OS.
dyn.load()
,
library.dynam()
, and getLoadedDLLs()
.
# for the example only using standard R packages : myPkgs <- c("stats", "MASS", "rpart", "Matrix") pl <- pkgLibs(myPkgs) pl stopifnot(exprs = { is.list(pl) length(pl) == length(myPkgs) is.character(pkgD <- names(pl)) }) ## Have seen this failing when a strange development version of "Matrix" was picked up: try( stopifnot( dir.exists(pkgD)) )
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.