read_md_paragraphs.Rd
Read paragraphs from a text file based on markdown format.
read_md_paragraphs(file, ptag = FALSE, collapse = FALSE)
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. |
a vector of character strings.
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.
#not run