vector2text | R Documentation |
Convert a vector into a comma separated text
vector2text(vector, sep = ", ", quotes = TRUE, force_single = FALSE, and = "")
v2t(vector, sep = ", ", quotes = TRUE, force_single = FALSE, and = "")
vector |
Vector. Vector with more than 1 observation. |
sep |
Character. String text wished to insert between values. |
quotes |
Boolean. Bring simple quotes for each observation. |
force_single |
Boolean. Force single quotes by replacing |
and |
Character. Add 'and' or something before last observation.
Not boolean variable so it can be used on other languages. Note that
the last comma will be suppressed if |
Vector pasting vector
values into a single string
Other Data Wrangling:
balance_data()
,
categ_reducer()
,
cleanText()
,
date_cuts()
,
date_feats()
,
file_name()
,
formatHTML()
,
holidays()
,
impute()
,
left()
,
normalize()
,
num_abbr()
,
ohe_commas()
,
ohse()
,
quants()
,
removenacols()
,
replaceall()
,
replacefactor()
,
textFeats()
,
textTokenizer()
,
year_month()
,
zerovar()
vector2text(LETTERS[1:5])
vector2text(c(1:5), quotes = FALSE)
vector2text(c(1:5), quotes = FALSE, sep = "-")
vector2text(c(1:5), and = "and also")
vector2text(c("Text", "R's"), force_single = TRUE)
# Shorter function with same purpose
v2t(LETTERS[1:5])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.