Inflate Rmd to package

inflate(
  pkg = ".",
  rmd = file.path("dev", "dev_history.Rmd"),
  name = "exploration",
  check = TRUE
)

Arguments

pkg

Path to package

rmd

Path to Rmd file to inflate

name

Name of the resulting vignette

check

Logical. Whether to check package after Rmd inflating

Value

Package structure. Return path to current package.

Examples

# 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"))
#> [1] "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpXCyytn/dummypackage/DESCRIPTION"
dev_file <- add_dev_history(pkg = dummypackage, overwrite = TRUE)
#> Created file .here in /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpXCyytn/dummypackage . Please start a new R session in the new project directory.
inflate(pkg = dummypackage, rmd = dev_file, name = "Exploration of my Data", check = FALSE)
#> Setting active project to '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpXCyytn/dummypackage'
#> First time using roxygen2. Upgrading automatically...
#> Loading dummypackage
#> Writing NAMESPACE
#> Adding 'knitr' to Suggests field in DESCRIPTION
#> Setting VignetteBuilder field in DESCRIPTION to 'knitr'
#> Adding 'inst/doc' to '.gitignore'
#> Adding '*.html', '*.R' to 'vignettes/.gitignore'
#> Adding 'rmarkdown' to Suggests field in DESCRIPTION
#> Writing 'vignettes/Exploration-of-my-Data.Rmd'
#> Edit 'vignettes/Exploration-of-my-Data.Rmd'
#> Updating dummypackage documentation
#> Loading dummypackage
#> Writing NAMESPACE #> Writing my_median.Rd #> Writing my_other_median.Rd #> Writing sub_median.Rd
#> [+] 2 package(s) added: stats, testthat.
#> [1] "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpXCyytn/dummypackage"
# 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)