daranzolin / rmdocs

browse help files as Rmarkdown documents

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rmdocs

Browse help files as RMarkdown source documents.

Installation

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

Usage

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:

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

RStudio

Bind the addin ‘Rmarkdown help() on object’ to a choice keyboard shortcut and away you go.

About

browse help files as Rmarkdown documents

License:Other


Languages

Language:R 100.0%