Displaying 1 result from an estimated 1 matches for "dynlib_path".
Did you mean:
dylib_path
2012 Jul 24
1
Finding dynamic shared libraries loaded with a package
..., this code will load bitops, then unload the shared
library and unload the package.
library(bitops)
# Show what's loaded
.dynLibs()
pkgname <- 'bitops'
# Get installation path for the package
pkgpath <- system.file(package=pkgname)
# Get a vector of paths for all loaded libs
dynlib_paths <- vapply(.dynLibs(), function(x) x[["path"]], character(1))
# Find which of the lib paths start with pkgpath
pkgmatch <- pkgpath == substr(dynlib_paths, 1, nchar(pkgpath))
# Get matching lib paths and strip off leading path and extension (.so or
.dll)
libnames <- sub("\\...