vectorToCode: programming tool to convert a vector in memory to code for...

Description Usage Arguments Value

View source: R/tools.R

Description

programming tool to convert a vector in memory to code for inclusion into programs.

Usage

1
vectorToCode(vectorData, includeParenthesis = TRUE, trim = NA, ...)

Arguments

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

Value

a character vector.


DarkerThanEver/personalR documentation built on Dec. 17, 2021, 4:06 p.m.