vectorToCode | R Documentation |
programming tool to convert a vector in memory to code for inclusion into programs.
vectorToCode(vectorData, includeParenthesis = TRUE, trim = NA, ...)
vectorData |
can be vector of class character, integer, logical, numeric, etc. Note that custom data types may not work properly. |
includeParenthesis |
boolean parameter defining if 'c()' should be included around the character vector returned. |
trim |
if NA (default) nothing is done, else should be value "both", "left" or "right". It will then cause all vectors to be white space trimmed on the specified site. See ?stringr::str_trim for more details. Note that trimming is done after formatting, so may undo settings like wide = x' |
... |
is used to transfer settings to the base format() function. See ?format for more info |
a character vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.