Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maurolepore/pkgdoc

[R-package] Reference multiple R-packages in one place
https://github.com/maurolepore/pkgdoc

devlopment metapackage package pkgdoc pkgdown r reference vignette website

Last synced: 6 days ago
JSON representation

[R-package] Reference multiple R-packages in one place

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# pkgdoc (deprecated)

See https://github.com/maurolepore/dverse

[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![Travis build status](https://travis-ci.org/maurolepore/pkgdoc.svg?branch=master)](https://travis-ci.org/maurolepore/pkgdoc)
[![Coverage status](https://coveralls.io/repos/github/maurolepore/pkgdoc/badge.svg)](https://coveralls.io/r/maurolepore/pkgdoc?branch=master)
[![CRAN status](https://www.r-pkg.org/badges/version/pkgdoc)](https://cran.r-project.org/package=pkgdoc)

Dataframe the documentation of available packages, and reference objects across multiple packages by package or concept. Combined with `krittr::kable()` or `DT::datatable()`, __pkgdoc__ allows you to reference functions by package or concept across multiple packages and to provide links to each topic's help file (similar to the Reference section of a [__pkgdown__](https://pkgdown.r-lib.org/) website but not limited to a single package).

* [Reference and tutorial](https://maurolepore.github.io/pkgdoc/articles/siteonly/reference.html)
* [__pkgdoc__ in action](https://forestgeo.github.io/fgeo/articles/siteonly/reference.html)

## Installation

``` r
# install.packages("devtools")
devtools::install_github("maurolepore/pkgdoc")
```

## Example

```{r}
library(pkgdoc)
```

`search_docs()` creates a dataframe of documentation available to you.

```{r example}
# Documentation of all installed packages
search_docs()

some_packages <- c("utils", "base")
search_docs(some_packages)
```

`reference_package()` and `reference_concept()` allow you to pick specific documentation.

```{r}
reference_package(c("stats", "MASS"))

reference_concept(c("combine strings", "files", "PCA"))
```

Use `knittr::kable()` or `DT::datatable()` for the links to become clickable.

```{r}
library(fgeo)

reference_concept(
c("datasets", "plot functions"),
url = "https://forestgeo.github.io/",
) %>%
arrange(concept) %>%
head() %>%
knitr::kable()
```