read_md_paragraphs: Read paragraphs from file

Description Usage Arguments Details Value Examples

Description

Read paragraphs from a text file based on markdown format.

Usage

1
read_md_paragraphs(file, ptag = FALSE, collapse = FALSE)

Arguments

file

character, file to read text from.

ptag

logical, wrap paragraphs in html paragraph tag an include full justification.

collapse

logical, collapse vector of paragraphs into a single element.

Details

The text file does not need to be a .md file. The function merely relies on the assumption that paragraphs are separated by an empty line, based on markdown formatting. This allows for typing up paragraphs in a plain text file using this convenient formatting, to be read into R wherever paragraphs of text are needed in an app.

Common uses include returning a vector of strings to be used as text for each tour step description in an introjs tour (ptag=FALSE and collapse=FALSE, the default) or a collapsed string of html text (ptag=TRUE and collapse=TRUE) for an app description.

Value

a vector of character strings.

Examples

1
#not run

leonawicz/apputils documentation built on May 13, 2019, 1:38 a.m.