as.markdown {statquotes} | R Documentation |
Function to transform statquote objects to strings suitable for markdown
Description
This function coerces statquote objects to strings suitable for rendering in markdown.
Quotes and sources are placed within output
formatted via the sprintf
function.
This function formats a statquote object to the tagged key:value
format used for
maintaining the statquotes database. The key names are:
quo: This is a quotation. src: Person or persons who said or wrote the quote. cit: Citation for the original quote. url: URL where the quote can be found (such as journal articles). tag: Comma-separated tags to categorize the quote. tex: TeX-formatted citation
Usage
as.markdown(quotes, form = "> *%s* -- %s\n\n", cite = TRUE)
as.tagged(quotes, qid = TRUE)
Arguments
quotes |
an object of class |
form |
structure of the markdown output for the text (first argument)
and source (second argument) passed to |
cite |
logical; should the |
qid |
logical. Should the quote id number 'qid' be included in the output? |
Value
character vector of formatted markdown quotes
A character vector of lines
See Also
as.data.frame.statquote
, as.latex
as.data.frame.statquote
, as.latex
, as.markdown
Examples
ll <- search_quotes("Tukey")
as.markdown(ll)
qitems <- search_quotes("Yates")
cat(as.tagged(qitems[1:5,]))