Description Usage Arguments Value Author(s) Examples
String Representation of a character vector
1 2 | strVectorRepr(ss, print_out = FALSE, single_quote = TRUE,
start_with_c = TRUE)
|
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. |
character.
Kaiyin Zhong, Fan Liu
1 2 3 4 5 6 7 8 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.