Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdequeljoe/rdoc
colourised R docs in the terminal
https://github.com/mdequeljoe/rdoc
cli colorization crayon documentation pretty-print r rstats
Last synced: 28 days ago
JSON representation
colourised R docs in the terminal
- Host: GitHub
- URL: https://github.com/mdequeljoe/rdoc
- Owner: mdequeljoe
- Created: 2019-02-28T16:37:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-30T10:06:00.000Z (over 5 years ago)
- Last Synced: 2024-09-30T04:04:54.582Z (about 1 month ago)
- Topics: cli, colorization, crayon, documentation, pretty-print, r, rstats
- Language: R
- Homepage:
- Size: 563 KB
- Stars: 49
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rdoc
[![Build Status](https://travis-ci.org/mdequeljoe/rdoc.svg?branch=master)](https://travis-ci.org/mdequeljoe/rdoc)
[![CRAN Status](https://www.r-pkg.org/badges/version/rdoc)](https://cran.r-project.org/package=rdoc)
[![codecov](https://codecov.io/gh/mdequeljoe/rdoc/branch/master/graph/badge.svg)](https://codecov.io/gh/mdequeljoe/rdoc)
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)rdoc = `help` + `tools::Rd2txt` + [cli](https://github.com/r-lib/cli) + [crayon](https://github.com/r-lib/crayon) + [prettycode](https://github.com/r-lib/prettycode)
![](man/img/rdoc.png)
`rdoc` can also be used in console sessions whereby the output will be interactively printed by section to avoid flooding it with too much text. The `` keypress will
print the next section and any other keypress will exit the interaction without printing
the remaining sections. This can be disabled via `options` (see below).![](man/img/console.png)
## install
```r
devtools::install_github("mdequeljoe/rdoc")
```
## optionsCustomising `rdoc` output is possible via `options`:
```r
# text formats - defaults to rdoc_text_formats()
options(rdoc.text_formats = rdoc::rdoc_text_formats(pkg = crayon::cyan))# doc style - defaults to rdoc_style()
options(rdoc.style = rdoc::rdoc_style(arguments = function(x) paste0("@", x)))# item bullet style to pass to tools::Rd2txt
options(rdoc.item_bullet = ">> ")#whether to include a package header, defaults to TRUE
options(rdoc.header = FALSE)#whether output be split by sections for non-terminal usage, defaults to TRUE
options(rdoc.by_section = FALSE)```
## base replacements
`help` and `?` can be overridden via:
```r
rdoc::use_rdoc()
```Resetting is possible with:
```r
rdoc::rm_rdoc()
```## contributing
contributions/suggestions welcome!