inflate: Inflate Rmd to package

Description Usage Arguments Value Examples

View source: R/inflate.R

Description

Inflate Rmd to package

Usage

1
2
3
4
5
6
7
8
inflate(
  pkg = ".",
  rmd = file.path("dev", "dev_history.Rmd"),
  name = "exploration",
  check = TRUE,
  document = TRUE,
  overwrite = c("ask", "yes", "no")
)

Arguments

pkg

Path to package

rmd

Path to Rmarkdown file to inflate

name

Name of the resulting vignette

check

Logical. Whether to check package after Rmd inflating

document

Logical. Whether to document your package using att_amend_desc

overwrite

Logical. Whether to overwrite vignette and functions if already exists.

Value

Package structure. Return path to current package.

Examples

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

# {fusen} steps
fill_description(pkg = dummypackage, fields = list(Title = "Dummy Package"))
dev_file <- add_dev_history(pkg = dummypackage, overwrite = TRUE)
inflate(pkg = dummypackage, rmd = dev_file, name = "Exploration of my Data", check = FALSE)

# Explore directory of the package
# browseURL(dummypackage)

# Try pkgdown build
# pkgdown::build_site(dummypackage)
# usethis::use_build_ignore("docs")
# usethis::use_git_ignore("docs")
# Delete dummy package
unlink(dummypackage, recursive = TRUE)

fusen documentation built on Aug. 4, 2021, 5:07 p.m.