Description Usage Arguments Details Value See Also Examples
Joins the elements of a character vector into one string.
1 | stri_flatten(str, collapse = "")
|
str |
vector of strings to be coerced to character |
collapse |
single string denoting the separator |
stri_flatten(str, collapse='XXX')
works like
paste(str, collapse='XXX', sep="")
.
If you wish to use some more fancy collapse
separators between flattened strings, call
stri_join(str, separators, collapse='')
.
If str
is not empty, then a single string is
returned. If collapse
has length > 1, then only
first string will be used.
Returns a single string, i.e. a character vector of length 1.
Other join: stri_c
, stri_join
,
stri_paste
; stri_dup
1 2 3 4 | stri_flatten(LETTERS)
stri_flatten(LETTERS, collapse=",")
stri_flatten(c('abc','123','\u0105\u0104'))
stri_flatten(stri_dup(letters[1:6],1:3))
|
[1] "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
[1] "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"
[1] "abc123<U+0105><U+0104>"
[1] "abbcccdeefff"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.