Finds package root directory by seraching for tne DESCRIPTION file that contains Package: pkg_name.

pkg_find_root(dir = getwd(), pkg_name, par = FALSE, ncores = NULL)

Arguments

dir

Character string. Directory to search. If unspecified, defaults to Sys.getenv("HOME").

pkg_name

Character string. Package name.

par

Logical. If TRUE, use multiple cores.

ncores

Integer. Number of cores to use if par = TRUE. If unspecified, defaults to detectCores() - 1.

Details

The function starts searching the specified dir. If the search does not return the root directory for the specified pkg_name, If the function fails to find a valid package root directory in dir, the following directories will be searched:

Author

Ivan Jacob Agaloos Pesigan

Examples

if (FALSE) { pkg_find_root( dir = getwd(), pkg_name = "boilerplatePackage", par = FALSE ) }