View source: R/fill_description.R
fill_description | R Documentation |
Fill out a DESCRIPTION file, such as (but not limited to) the one provided by the templateR R package template. For any given field, set its corresponding argument as follows to get certain behaviour:
NULL
: Keeps the current value.
NA
: Removes the field from the DESCRIPTION file entirely.
fill_description(
path = here::here("DESCRIPTION"),
package,
title,
description,
github_owner = NULL,
github_repo = package,
authors = construct_authors(authors = NULL),
depends = paste0("R ", "(>= ", bioc_r_versions(bioc_version = "devel", depth = 2)$r,
")"),
imports = infer_deps(path = path, which = "Imports", add_newlines = TRUE),
suggests = infer_deps(path = path, which = "Suggests", add_newlines = TRUE),
remotes = NULL,
version = NULL,
license = NULL,
encoding = NULL,
vignettebuilder = NULL,
biocviews = infer_biocviews(pkgdir = dirname(path), add_newlines = TRUE),
url = paste0("https://github.com/", github_owner, "/", github_repo),
bugreports = paste0(url, "/issues"),
save_path = path,
verbose = TRUE,
fields = list()
)
path |
Path to the DESCRIPTION file. |
package |
The name of your R package. |
title |
The title of your R package. |
description |
The description of your R package. |
github_owner |
The owner of your R package's GitHub repository.
Can be inferred from the |
github_repo |
The name of your R package's GitHub repository. |
authors |
A list of authors who contributed to your R package,
each provided as objects of class person.
By default, if an |
depends |
R package Depends. Defaults to the version of R that the current development version of Bioconductor depends on. |
imports |
R package Imports. These dependencies will be automatically installed with your R package. |
suggests |
R package Suggests. These dependencies will NOT be automatically installed with your R package, unless otherwise specified by users during installation |
remotes |
R package Remotes |
version |
The current version of your R package (e.g 0.99.0). |
license |
R package license. See here for guidance. |
encoding |
R package Encoding. |
vignettebuilder |
R package VignetteBuilder. |
biocviews |
Standardised biocViews terms used to describe your package. Defaults to automatically recommending terms using the infer_biocviews function. Note that non-Bioconductor packages (e.g. CRAN) can also use this field. |
url |
URL where your R package is distributed from (e.g. GitHub repository, Bioconductor page, and/or CRAN page). Can be a single character string or a character vector. |
bugreports |
A URL where users of your package should go if they encounter bugs or have feature requests. |
save_path |
Path to save the updated DESCRIPTION file to.
Defaults to overwriting the input file ( |
verbose |
Print messages. |
fields |
A named list of additional fields to fill the
DESCRIPTION file with: e.g. |
An object of class description.
#### Get example DESCRIPTION file ####
url <- "https://github.com/neurogenomics/templateR/raw/master/DESCRIPTION"
path <- tempfile(fileext = "DESCRIPTION")
utils::download.file(url,path)
#### Fill out DESCRIPTION file ####
d <- fill_description(
path = path,
package = "MyPackageName",
title = "This Package Does Awesome Stuff",
description = paste(
"MyPackageName does several awesome things.",
"Describe thing1.",
"Describe thing2.",
"Describe thing3."
),
github_owner = "OwnerName",
biocviews = c("Genetics", "SystemsBiology"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.