To describe your package and how to install it

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/Rtmpjv2T5k/pkg_description.html created
#>  Edit '/tmp/Rtmpjv2T5k/pkg_description.html'
#> You can now edit /tmp/Rtmpjv2T5k/pkg_description.html
shiny::includeHTML(file.path(out.dir, "pkg_description.html"))

papillon

This is package {papillon}: Build And Highlight Package Documentation With Customized Templates.
Current version is 0.0.1.9000.

Installation

The list of dependencies required to install this package is: attachment, bookdown, cli, crayon, desc, devtools, knitr, magrittr, pkgdown, readr, remotes, rmarkdown, shiny, 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)) {
      message(paste("     installing", i))
      install.packages(i)
    }
  }

Create and update a custom README with installation instructions

  • This uses {usethis} Readme template for packages and fill the installation instructions.
  • This function can be run anytime during project development as it will only update the description and installation parts