This can be useful to create your Readme for instance or to send the instructions file for your clients to install your package.
path <- system.file("DESCRIPTION", package = "papillon")
out.dir <- tempdir()
create_pkg_desc_file(path, source = c("archive"), to = "html")
#> File /tmp/Rtmpj7IcRB/pkg_description.html created
#> ☐ Edit '/tmp/Rtmpj7IcRB/pkg_description.html'.
#> You can now edit /tmp/Rtmpj7IcRB/pkg_description.html
This is package {papillon}: Build And Highlight Package Documentation With Customized Templates.
Current version is 0.0.1.9000.
The list of dependencies required to install this package is: attachment, bookdown, cli, crayon, desc, devtools, knitr, magrittr, pkgdown, readr, remotes, rmarkdown, shiny, testthat, usethis, utils.
To install the package, you can run the following script
# install.packages("remotes")
remotes::install_local(path = "papillon_0.0.1.9000.tar.gz")
In case something went wrong, you may want to install dependencies before using:
# No Remotes ----
# Attachments ----
to_install <- c("attachment", "bookdown", "cli", "crayon", "desc", "magrittr", "pkgdown", "readr", "rmarkdown", "usethis")
for (i in to_install) {
message(paste("looking for ", i))
if (!requireNamespace(i, quietly = TRUE)) {
message(paste(" installing", i))
install.packages(i)
}
}