
Last chance! 50% off unlimited learning
Sale ends in
Convert a vector into a comma separated text
vector2text(vector, sep = ", ", quotes = TRUE, and = "")v2t(vector, sep = ", ", quotes = TRUE, and = "")
Vector. Vector with more than 1 observation.
Character. String text wished to insert between values.
Boolean. Bring simple quotes for each observation.
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 Sys.getenv("LARES_NUMFORMAT")
is set to 1
and you have less than 3 values.
Vector pasting vector
values into a single string
Other Data Wrangling:
balance_data()
,
categ_reducer()
,
cleanText()
,
date_cuts()
,
date_feats()
,
formatNum()
,
holidays()
,
impute()
,
left()
,
normalize()
,
numericalonly()
,
ohe_commas()
,
ohse()
,
removenacols()
,
removenarows()
,
replaceall()
,
textFeats()
,
textTokenizer()
,
year_month()
,
year_week()
# NOT RUN {
vector2text(LETTERS[1:5])
vector2text(c(1:5), quotes = FALSE)
vector2text(c(1:5), quotes = FALSE, sep = "-")
vector2text(c(1:5), and = "and also")
# Shorter function with same purpose
v2t(LETTERS[1:5])
# }
Run the code above in your browser using DataLab