pkg_find_root: Find Package Root Directory

Description Usage Arguments Details Author(s) Examples

View source: R/pkg_find_root.R

Description

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

Usage

1
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(s)

Ivan Jacob Agaloos Pesigan

Examples

1
2
3
4
5
6
7
8
## Not run: 
pkg_find_root(
  dir = getwd(),
  pkg_name = "boilerplatePackage",
  par = FALSE
)

## End(Not run)

jeksterslabds/jeksterslabRpkg documentation built on Jan. 22, 2021, 11:43 p.m.