paste_text {tablesgg} | R Documentation |
Paste Strings that may Include plotmath
or Markdown
Description
Paste 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.
Usage
paste_text(x, ..., sep=c("plain"=" ", "plotmath"="~", "markdown"=" "))
Arguments
x , ... |
One or more character vectors or data frames. Data frames should contain
columns |
sep |
Character vector containing strings to be inserted between text from
different arguments when pasting them together. It may have one string
per valid |
Details
"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.
Value
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".
Note
Changing "plain" text to "markdown" is incomplete. For example, literal
*
or _
will be misinterpreted as markdown codes.