plotmath or MarkdownPaste together text strings, where one or more of the strings may contain
plotmath expressions or markdown/HTML tags. This is an internal
function, not intended to be called by package users.
paste_text(x, ..., sep=c("plain"=" ", "plotmath"="~", "markdown"=" "))A data frame with columns text, textspec, and
fontface. The number of rows equals the number in the longest data
frame argument. text contains the row-by-row pasted-together text
from the arguments, and textspec specifies the content type of each
row. fontface is NA when textspec is "plotmath", 1 when
textspec is "markdown", and taken from x when
textspec is "plain".
One or more character vectors or data frames. Data frames should contain
columns text, and optionally textspec and fontface.
(A character vector is treated as a data frame with text as its
only column.) textspec should indicate the content type of
text; if not present it is inferred by looking for special prefixes
in text. fontface should be 1 for plain text, 2 for bold, 3
for italic, and 4 for bold italic; if not present a value of 1 is assumed.
Each data frame will have its rows recycled to match the number of rows in
the longest.
Character vector containing strings to be inserted between text from
different arguments when pasting them together. It may have one string
per valid textspec value, named by that value. Note that in
plotmath, "*" juxtaposes two expressions with no space between them; "~"
inserts some space; and "~~" inserts more.
"plotmath" and "markdown" strings cannot be pasted together. When a
"plain" string is pasted together with one of the other types, the result
will have the textspec value of the non-plain text.
If a set of "plain" text strings to be pasted together use different fontfaces, the final text will use plotmath or markdown to accomodate the mixed faces.