att_amend_desc: Amend DESCRIPTION with dependencies read from package code...

Description Usage Arguments Value Examples

View source: R/att_to_description.R

Description

Amend package DESCRIPTION file with the list of dependencies extracted from R, tests, vignettes files. att_to_desc_from_pkg() is an alias of att_amend_desc(), for the correspondence with att_to_desc_from_is.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
att_amend_desc(
  path = ".",
  path.n = "NAMESPACE",
  path.d = "DESCRIPTION",
  dir.r = "R",
  dir.v = "vignettes",
  dir.t = "tests",
  extra.suggests = NULL,
  pkg_ignore = NULL,
  document = TRUE,
  normalize = TRUE,
  inside_rmd = FALSE,
  must.exist = TRUE
)

att_to_desc_from_pkg(
  path = ".",
  path.n = "NAMESPACE",
  path.d = "DESCRIPTION",
  dir.r = "R",
  dir.v = "vignettes",
  dir.t = "tests",
  extra.suggests = NULL,
  pkg_ignore = NULL,
  document = TRUE,
  normalize = TRUE,
  inside_rmd = FALSE,
  must.exist = TRUE
)

Arguments

path

path to the root of the package directory. Default to current directory.

path.n

path to namespace file.

path.d

path to description file.

dir.r

path to directory with R scripts.

dir.v

path to vignettes directory. Set to empty (dir.v = "") to ignore.

dir.t

path to tests directory. Set to empty (dir.t = "") to ignore.

extra.suggests

vector of other packages that should be added in Suggests (pkgdown, covr for instance)

pkg_ignore

vector of packages names to ignore.

document

Run function roxygenise of roxygen2 package

normalize

Logical. Whether to normalize the DESCRIPTION file. See desc_normalize

inside_rmd

Logical. Whether function is run inside a Rmd, in case this must be executed in an external R session

must.exist

Logical. If TRUE then an error is given if packages do not exist within installed packages. If NA, a warning.

Value

Update DESCRIPTION file.

Examples

1
2
3
4
5
6
tmpdir <- tempdir()
file.copy(system.file("dummypackage",package = "attachment"), tmpdir,
 recursive = TRUE)
dummypackage <- file.path(tmpdir, "dummypackage")
# browseURL(dummypackage)
att_amend_desc(path = dummypackage)

attachment documentation built on Nov. 16, 2021, 9:17 a.m.