Package 'snorkel'

Title: RStudio Addin To Help Format 'roxygen2'
Description: Insert, or replace text with, formatting code for 'roxygen2' function documentation in a package, like making text bold, inserting a URL, or linking to functions in other packages.
Authors: Matt Dray [aut, cre]
Maintainer: Matt Dray <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-11-15 04:05:46 UTC
Source: https://github.com/matt-dray/snorkel

Help Index


Take Time Out To Breathe

Description

Take Time Out To Breathe

Usage

breathe(times = 3L, seconds = 5)

Arguments

times

Numeric. Number of times to breathe.

seconds

Numeric. Number of seconds to take when inhaling and exhaling.

Value

Message printed to the console.

Examples

breathe()

Format Bold

Description

Surround selected text with Rd markup for bold.

Usage

rd_bold()

Details

  • Selected text: text

  • Result of function: ⁠\strong{text}⁠

  • Example output with no text selection: ⁠\strong{}⁠

References

The Writing R Extensions manual.


Format Code

Description

Surround selected text with Rd markup for inline code.

Usage

rd_code()

Details

  • User-selected text: text

  • Result of function: ⁠\code{text}⁠

  • Example output with no text selection: ⁠\code{}⁠

References

The Writing R Extensions manual.


Link to Email

Description

Surround selected text with Rd markup for an email link.

Usage

rd_email()

Details

  • User-selected text: address

  • Result of function: ⁠\email{address}⁠

  • Example output with no text selection: ⁠\email{}⁠

References

The Writing R Extensions manual.


Link To Function (Another Package)

Description

Surround selected text (in the form 'package::function') with Rd markup that links to a function in another package.

Usage

rd_fn_other_pkg()

Details

  • User-selected text: ⁠package::function⁠

  • Result of function: ⁠\code{\link[package]{function}}⁠

  • Example output with no text selection: ⁠\code{\link[]{}}⁠

References

The Writing R Extensions manual.


Link to Function (This Package)

Description

Surround selected text with Rd markup that links to a function in the current package.

Usage

rd_fn_this_pkg()

Details

  • User-selected text: text

  • Result of function: ⁠\code{\link{text}}⁠

  • Example output with no text selection: ⁠\code{\link{}}⁠

References

The Writing R Extensions manual.


Format Italic

Description

Surround selected text with Rd markup for italic.

Usage

rd_italic()

Details

  • Selected text: text

  • Result of function: ⁠\emph{text}⁠

  • Example output with no text selection: ⁠\emph{}⁠

References

The Writing R Extensions manual.


Insert List (Named)

Description

Insert an Rd markup skeleton for a definition (named) list.

Usage

rd_list_definition()

Details

Example output:

\describe{
  \item{One}{First item}
  \item{Two}{Second item}
}

References

The Writing R Extensions manual.


Insert List (Ordered)

Description

Insert an Rd markup skeleton for an ordered (numbered) list.

Usage

rd_list_ordered()

Details

Example output:

\enumerate{
  \item First item
  \item Second item
}

References

The Writing R Extensions manual.


Insert List (Bulleted)

Description

Insert an Rd markup skeleton for an unordered (bulleted) list.

Usage

rd_list_unordered()

Details

Example output:

\itemize{
  \item First item
  \item Second item
}

References

The Writing R Extensions manual.


Format Package

Description

Surround selected text with Rd markup for package names.

Usage

rd_package()

Details

  • User-selected text: package

  • Result of function: ⁠\pkg{package}⁠

  • Example output with no text selection: ⁠\pkg{}⁠

References

The Writing R Extensions manual.


Link To Web

Description

Surround selected URL text with Rd markup for a link to the web.

Usage

rd_url()

Details

  • User-selected text: url

  • Result of function: ⁠\url{url}⁠

  • Example output with no text selection: ⁠\url{}⁠

References

The Writing R Extensions manual.


Link To Web (Named)

Description

Surround selected URL text with Rd markup for a link to the web and show a text label.

Usage

rd_url_named()

Details

  • User-selected text: url

  • Result of function: ⁠\href{url}{Link text}⁠

  • Example output with no text selection: ⁠\href{}{Link text}⁠

References

The Writing R Extensions manual.