Inflate Rmd to package
Usageinflate(
pkg = ".",
flat_file,
vignette_name = "Get started",
open_vignette = TRUE,
check = TRUE,
document = TRUE,
overwrite = "ask",
clean = "ask",
update_params = TRUE,
codecov = FALSE,
...
)
Arguments
Path to package
Path to Rmarkdown file to inflate
Character. Title of the resulting vignette. Use NA
if you do not want to create a vignette.
Logical. Whether to open vignette file at the end of the process
Logical. Whether to check package after Rmd inflating
Logical. Whether to document your package using att_amend_desc
Logical (TRUE, FALSE) or character ("ask", "yes", "no). Whether to overwrite vignette and functions if already exists.
Logical (TRUE, FALSE) or character ("ask", "yes", "no) Whether to delete files that are not anymore created by the current flat file. Typically, if you have deleted or renamed a function in the flat file. Default to "ask".
Logical. Whether to update the inflate parameters in the configuration file.
Logical. Whether to compute code coverage with covr::package_coverage()
.
Arguments passed to devtools::check()
. For example, you can do inflate(check = TRUE, quiet = TRUE)
, where quiet
is passed to devtools::check()
.
Package structure. Return path to current package.
See alsoinflate_all()
to inflate every flat files according to the configuration file.
# Create a new project
dummypackage <- tempfile("dummy.package")
dir.create(dummypackage)
# {fusen} steps
dev_file <- add_flat_template(template = "full", pkg = dummypackage, overwrite = TRUE)
#> Created file .here in /tmp/Rtmpki0c42/dummy.package18b8761dfea7 . Please start a new R session in the new project directory.
flat_file <- dev_file[grepl("flat", dev_file)]
fill_description(pkg = dummypackage, fields = list(Title = "Dummy Package"))
inflate(
pkg = dummypackage,
flat_file = flat_file,
vignette_name = "Exploration of my Data",
check = FALSE
)
#> ✔ Setting active project to "/tmp/Rtmpki0c42/dummy.package18b8761dfea7".
#> ℹ Loading dummy.package18b8761dfea7
#> Writing NAMESPACE
#> ✔ Adding knitr to Suggests field in DESCRIPTION.
#> ☐ Use `requireNamespace("knitr", quietly = TRUE)` to test if knitr is
#> installed.
#> ☐ Then directly refer to functions with `knitr::fun()`.
#> ✔ Adding "inst/doc" to .gitignore.
#> ── config file for dev/flat_full.Rmd ───────────────────────────────────────────
#> ✔ R: R/my_median.R was added to the config file
#> ✔ R: R/my_other_median.R was added to the config file
#> ✔ tests: tests/testthat/test-my_median.R was added to the config file
#> ✔ tests: tests/testthat/test-my_other_median.R was added to the config file
#> ✔ vignettes: vignettes/exploration-of-my-data.Rmd was added to the config file
#> Saving attachment parameters to yaml config file
#> Updating dummy.package18b8761dfea7 documentation
#> ℹ Loading dummy.package18b8761dfea7
#> Writing NAMESPACE
#> Writing my_median.Rd
#> Writing my_other_median.Rd
#> Writing sub_median.Rd
#> ℹ Loading dummy.package18b8761dfea7
#> [+] 3 package(s) added: stats, rmarkdown, testthat.
# Explore directory of the package
# browseURL(dummypackage)
# Try pkgdown build
# usethis::use_pkgdown()
# pkgdown::build_site(dummypackage)
# Delete dummy package
unlink(dummypackage, recursive = TRUE)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4