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

View source: R/tools.R

vectorToCodeR Documentation

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

Description

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

Usage

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.


BenBruyneel/BBPersonalR documentation built on Aug. 23, 2024, 8:28 p.m.