Skip to content

jamesotto852/tldr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tldr

Lifecycle:Experimental

The goal of tldr is to provide short-form documentation in the console, styled with cli:

tldr-ex-1

Included are RStudio addins which, when bound to keyboard shortcuts, facilitate efficient access to tldr documentation:

tldr-ex-2

tldr is inspired by tldr-pages, a project which provides simpler documentation for command-line tools.

Installation

If you are interested in installing tldr you can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("jamesotto852/tldr")

tldr documentation for objects in base R

We have provided documentation for for commonly used functions included in the base distribution of R in tldrDocs, which you can install via:

remotes::install_github("jamesotto852/tldrDocs")

Writing tldr documentation

This package includes a Roxygen2 extension which allows for the creation of tldr documentation files from Roxygen skeletons. This is done via tldr_roclet() and custom Roxygen tags such as @paramtldr and @exampletldr. Once the system for documentation is more stable, we will be writing a guide on its use for other developers. For an example of what a package with tldr-style documentation looks like, there is another package: tldrExample, which exports several simple objects with Roxygen skeletons that produce tldr documentation.

How it works

tldr_roclet() creates .Rd files based on relevant tags in the Roxygen skeleton (including the new @paramtldr and @exampletldr). These .Rd files are written to the /inst/tldr/ directory. Once the package is installed, tldr_help() and tldr_package() are able to find the relevant files which are turned into console output by tldr().

This process is based on the help() function—for those who are interested, I have a blog post in which I go through how ? and help() work in detail.

About

An R package for short-form documentation in the console

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages