Package 'WrapRmd'

Title: RStudio Addin for Wrapping RMarkdown Paragraphs
Description: Provides an RStudio addin for wrapping paragraphs in an RMarkdown document without inserting linebreaks into spans of inline R code.
Authors: Tristan Mahr [aut, cre], Shir Dekel [ctb]
Maintainer: Tristan Mahr <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9006
Built: 2024-11-15 04:36:12 UTC
Source: https://github.com/tjmahr/WrapRmd

Help Index


Run selection through knitr and commonmark

Description

Call this addin to preview output of an R markdown selection.

Usage

knit_selection_addin()

Wrap text but don't insert lines breaks into inline R code

Description

Wrap text but don't insert lines breaks into inline R code

Usage

str_rmd_wrap(string, width = getOption("WrapRmd.width", 80))

Arguments

string

a string to wrap

width

desired line width. Defaults to options("WrapRmd.width").

Details

This function finds all inline R code spans in a string, replaces all non-word characters in the R spans with "Q"s, re-wraps the string, and restores the original inline R spans.

This function preserves blanks lines between paragraphs.

Value

a wrapped copy of the string


Wrap text but don't insert lines breaks into inline R code

Description

Call this addin to wrap paragraphs in an R Markdown document.

Usage

wrap_rmd_addin()

Details

The maximum line width can be set via options(WrapRmd.width). Further fine tuning can be done via options “WrapRmd.smart” and “WrapRmd.extensions”, which are passed down to markdown_commonmark.


WrapRmd

Description

Provides an RStudio addin for wrapping paragraphs in an RMarkdown document without inserting linebreaks into spans of inline R code.

Author(s)

Maintainer: Tristan Mahr [email protected]

Other contributors: