search for: pkgmatch

Displaying 1 result from an estimated 1 matches for "pkgmatch".

Did you mean: argmatch
2012 Jul 24
1
Finding dynamic shared libraries loaded with a package
...) 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("\\.[^\\.]*$", "", basename(dynlib_paths[pkgmatch])) library.dynam.unload(libnames, pkgpath) # Show what's loaded .d...