Learn R Programming

altdoc is a simple and powerful package to create documentation websites for R packages. altdoc makes it trivial to create beautiful websites for simple R packages, and it can efficiently organize documentation for complex projects with hundreds of functions or dozens vignettes. Its features include:

  • Support for several documentation frameworks:
  • Render:
    • Quarto and Rmarkdown vignettes.
    • Reference pages for exported functions, along with evaluated examples.
    • Common sections: README.md, NEWS.md, CHANGELOG.md, CODE_OF_CONDUCT.md, CITATION.md, etc.
  • Preview the site:
    • Browser
    • RStudio Viewer
  • Deploy the website:
    • Github pages
    • Other platforms

Installation

You can install the CRAN version:

install.packages("altdoc")

You can also install the development version to benefit from the latest bug fixes:

remotes::install_github("etiennebacher/altdoc")

Quick start

A typical workflow with altdoc is to execute these commands from the root directory of the package:

### Create the website structure for one of the documentation generators
setup_docs(tool = "docsify")
# setup_docs(tool = "docute")
# setup_docs(tool = "mkdocs")
# setup_docs(tool = "quarto_website")

### Render the vignettes and man pages
render_docs()

### Preview the website
preview_docs()

See the Get Started vignette for more details.

Demos

The websites in this table were created using Altdoc:

Copy Link

Version

Install

install.packages('altdoc')

Monthly Downloads

2,632

Version

0.5.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Etienne Bacher

Last Published

January 23rd, 2025

Functions in altdoc (0.5.0)

setup_github_actions

Create a Github Actions workflow
setup_docs

Initialize documentation website settings
render_docs

Update documentation
preview_docs

Preview the documentation in a webpage or in viewer