CollapsABEL (version 0.10.11)

strVectorRepr: String Representation of a character vector

Description

String Representation of a character vector

Usage

strVectorRepr(ss, print_out = FALSE, single_quote = TRUE, start_with_c = TRUE)

Arguments

ss
character.
print_out
logical. Whether to print out the string representation.
single_quote
Logical, whether to use single quote for wrap strings. Default to TRUE, when set to FALSE, double quote is used.
start_with_c
Logical, whether the representation should start with "c(", when set to FALSE, "(" is used. Default to TRUE.

Value

character.

Examples

Run this code
## Not run: 
# strVectorRepr(letters[1:3]) == 'c("a", "b", "c")'
# strVectorRepr(
#   as.character(1:3)) == 'c("1", "2", "3")'
# all(eval(parse(text = strVectorRepr(as.character(1:3)))) == 
#   c("1", "2", "3"))
# ## End(Not run)

Run the code above in your browser using DataLab