Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/MilesMcBain/rmdocs

browse help files as Rmarkdown documents
https://github.com/MilesMcBain/rmdocs

Last synced: 8 days ago
JSON representation

browse help files as Rmarkdown documents

Awesome Lists containing this project

README

        

---
output: github_document
---

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

# rmdocs

Browse help files as RMarkdown source documents.

## Installation

``` r
# install.packages("devtools")
devtools::install_github("milesmcbain/rmdocs")
```
## Usage

```{r example, eval = FALSE}
rmdocs::rmd_help(help)
```

Use option `rmd_doc_width` to control the text width of the documentation
output. Defaults to 80.

### Replacing `help` and `?`

So in love with Rmd help that you can't imagine it any other way? I HEAR you.
If you call `library(rmdocs)` Rmarkdown generating replacements for
`utils::help` and `utils::?` will be loaded into your session. Avoid the `library` call if you don't want that.

### VSCode

In `keybindings.json`, assuming you have `{rstudioapi}` emulation enabled:

```{json}
[
{
"description": "Rmd helpfile for object",
"key": "ctrl+shift+h",
"command": "r.runCommandWithSelectionOrWord",
"args": "rmddocs::rs_rmd_help()",
"when": "editorTextFocus"
},
]
```

### RStudio

[Bind the addin](https://www.infoworld.com/article/3327573/do-more-with-r-rstudio-addins-and-keyboard-shortcuts.html) 'Rmarkdown help() on object' to a choice keyboard shortcut and away you go.