Description Usage Arguments Details Value
The function parses values and key names to be used with PGF key-value pairs by escaping LaTeX special characters, masking output with braces, or checking valid input.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | pgfvalue_value(value, mask = FALSE, ...)
## S3 method for class 'character'
pgfvalue_value(value, mask = FALSE, na = NA_character_,
newlines = FALSE, spaces = FALSE, ...)
## S3 method for class 'pgfvalue_value'
pgfvalue_value(value, mask = FALSE, ...)
## S3 method for class 'logical'
pgfvalue_value(value, mask = FALSE, na = NA_character_,
...)
## S3 method for class 'integer'
pgfvalue_value(value, mask = FALSE, na = NA_character_,
...)
## S3 method for class 'numeric'
pgfvalue_value(value, mask = FALSE, na = NA_character_,
...)
## S3 method for class 'Date'
pgfvalue_value(value, mask = FALSE, na = NA_character_, ...)
## S3 method for class 'POSIXt'
pgfvalue_value(value, mask = FALSE, na = NA_character_,
time = FALSE, ...)
pgfvalue_key(key)
|
value |
value to be parsed, see methods for available classes |
mask |
if |
... |
additional parameter passed to S3 methods |
na |
character, replacement value for |
newlines |
boolean, controls escaping of single new line characters, see details |
spaces |
boolean, controls behaviour of multiple white spaces, see details |
time |
boolean, controls return of time part |
key |
character string, if of length greater one, only first entry will be used |
Special characters in character vectors value will be
escaped:
backslashes (\) are replaced by \textbackslash
special characters (#, $, %, &,
_, {, }) are escaped by prepending a
backslash
\textbackslash is appended a pair of curly brackets
tilde (~) and circumflex (^) are replaced by
their LaTeX variants \textasciitilde and
\textasciicircum
carriage returns are replaced by a new line character
any white spaces are replace by a single space
any leading or trailing spaces will be removed
If spaces = TRUE any multiple spaces are escaped to
protected LaTeX spaces (or "control" spaces).
If newlines = TRUE any single line break will be replaces by
a LaTeX linebreak (\).
Key names may contain any alpha-numeric characters as well as
white spaces (leading and trailing ones will be omitted) and special
characters ., _, $, or /. The latter two
are used as path separators. Any part of key before the
last / or $ is used as path.
an object of class pgfvalue_value; The initial class of
value will be, if it does not already contain
pgfvalue_value expanded by pgfvalue_value.
Return values that contain equal signs, colons, or new line
characters can be masked with curly brackets if mask = TRUE.
If mask = TRUE and return value is already masked, not
additional braces will be added. If mask = TRUE and return value
does not contain special characters, masking braces will be
removed.
For value of type pgfvalue_value and mask = FALSE,
the return value will remain unchanged.
Numeric values will be returned in "fixed point" decimal notation with decimal mark being a dot.
Date values are returned in ISO 8601 format, see %F
formatting string in strptime.
Date time values are returned as date values only if
time = FALSE (the default). Otherwise, format will be
YYYY-MM-DDThh:mm:ss, see %F and %X
formatting string in strptime.
Function pgfvalue_key returns a valid name of the key as an
object of class pgfvalue_key. If a path name is included in
key, see details, it is set as attribute path.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.