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)
dir | Character string.
Directory to search.
If unspecified, defaults to |
---|---|
pkg_name | Character string. Package name. |
par | Logical.
If |
ncores | Integer.
Number of cores to use if |
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:
../dir
../../dir
working directory
(getwd()
)
Ivan Jacob Agaloos Pesigan