Given the name of a package, this returns a path to the installed copy of the package, which can be passed to other devtools functions.
inst(name)
It searches for the package in .libPaths()
. If multiple
dirs are found, it will return the first one.
inst("pkgload")
#> [1] "/tmp/RtmpgJnrok/temp_libpath2f116938a8f2/pkgload"
inst("grid")
#> [1] "/opt/R/4.4.1/lib/R/library/grid"