chunkr: Interactively Create Rmarkdown Chunks

Description Usage Details Examples

View source: R/chunkr.R

Description

Addin that splits full documents into Rmarkdown chunks or wraps highlighted text in an active RStudio document editor in a Rmarkdown chunk.

Usage

1
2
3
4
5

Details

Setting remedy_opts$set(list(full_doc=TRUE)) chunkr will convert entire document by remedy_opts$get('token_purl'). The default token is the output from a purl conversion (## —-chunk name,chunk options—-).

Setting remedy_opts$set(list(full_doc=FALSE)), user highlights text and chunkr will wrap a new Rmarkdown chunk around it, utilizing the other options in remedy_opts.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
remedy_example(
    c( "# Create a chunk",
    "a <- 12", 
    "aaa <- 13"), 
    chunkr
    )

## End(Not run)

ThinkR-open/remedy documentation built on Aug. 26, 2020, 5:45 p.m.