fill_description: Fill DESCRIPTION file of the package

Description Usage Arguments Value Examples

View source: R/fill_description.R

Description

Fill DESCRIPTION file of the package

Usage

1
fill_description(pkg = ".", fields, overwrite = FALSE)

Arguments

pkg

Path to package

fields

A named list of fields to add to DESCRIPTION, potentially overriding default values. See use_description for how you can set personalized defaults using package options

overwrite

Whether to overwrite existing DESCRIPTION

Value

Fill DESCRIPTION file with fields. Return path to file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Create a new project
tmpdir <- tempdir()
dummypackage <- file.path(tmpdir, "dummypackage")
dir.create(dummypackage)

fill_description(
  pkg = dummypackage,
  fields = list(
    Title = "Build A Package From Rmarkdown file",
    Description = paste("Use Rmd First method to build your package.",
                        "Start your package with documentation.",
                        "Everything can be set from a Rmarkdown file in your project."),
    `Authors@R` = c(
      person("Sebastien", "Rochette", email = "sebastien@thinkr.fr",
             role = c("aut", "cre"), comment = c(ORCID = "0000-0002-1565-9313")),
      person(given = "ThinkR", role = "cph")
    )
  )
)

# Delete dummy package
unlink(dummypackage, recursive = TRUE)

fusen documentation built on July 26, 2021, 5:06 p.m.