Learn R Programming

readme2vignette

The goal of readme2vignette is to attempt to install a package directly GitHub or CRAN with convert README.md to Vignette during Package installation.

Based on remotes::install_github() and remotes::install_cran() that remotes version 2.4.2.

Installation

You can install the released version of readme2vignette from CRAN with:

install.packages("readme2vignette")

You can install the development version of readme2vignette like so:

install.packages("remotes")
remotes::install_github("indenkun/readme2vignette")

Example

install_cran_with_readme()

The basic usage is the same as remotes::install_cran().

If you try to install a package with README.md but no vignette from CRAN Repository using readme2vignette::install_cran_with_readme(), by default the argument readme_to_vignette is TRUE and the contents of README.md becomes a vignette called README.

Installation from binary packages is not supported. Installation must always be done from the sourceco package.

readme2vignette::install_github_with_readme("MissMech")

Therefore, the contents of README.md can be referenced in the local environment by vignette("README", package = "packagename").

vignette("README", package = "MissMech")

install_github_with_reademe()

The basic usage is the same as remotes::install_github().

If you try to install a package with README.md but no vignette from GitHub using readme2vignette::install_github_with_readme(), by default the argument readme_to_vignette is TRUE and the contents of README.md becomes a vignette called README.

readme2vignette::install_github_with_readme("indenkun/MissMech")

Therefore, the contents of README.md can be referenced in the local environment by vignette("README", package = "packagename").

vignette("README", package = "MissMech")

Note

The remotes package on which this code is based was created by the author of remotes and is now released at MIT.

The author of the remotes package is currently listed as Developed by Gábor Csárdi, Jim Hester, Hadley Wickham, Winston Chang, Martin Morgan, Dan Tenenbaum, Posit Software, PBC.

See r-lib/remote for detailed authorship.

Under the current specification, the images in the README.md are copied for the figures in the directories under man/figures/, but not for the images in other directories, which are missing.

License

MIT

Imports packages

  • desc
  • fs
  • knitr
  • pkgbuild
  • remotes
  • rmarkdown
  • usethis
  • utils

Copy Link

Version

Install

install.packages('readme2vignette')

Monthly Downloads

156

Version

0.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Mao Kobayashi

Last Published

June 26th, 2024

Functions in readme2vignette (0.1.0)

install_github_with_readme

Attempts to install a package directly from GitHub with convert README to Vignette during Package installation.
add_readme_to_vignette

Add README to vignette
install_cran_with_readme

Attempts to install a package from CRAN with with convert README to Vignette during Package installation.
readme2vignette-package

readme2vignette: Convert README to Vignette During Package Installation