Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

strcat

String Concatenation


Description

Concatenate all strings in a character vector

Usage

strcat(s1, s2 = NULL, collapse = "")

Arguments

s1

character string or vectors

s2

character string or vector, or NULL (default)

collapse

character vector of length 1 (at best a single character)

Details

Concatenate all strings in character vector s1, if s2 is NULL, or cross-concatenate all string elements in s1 and s2 using collapse as ‘glue’.

Value

a character string or character vector

See Also

Examples

strcat(c("a", "b", "c"))                        #=> "abc"
strcat(c("a", "b"), c("1", "2"), collapse="x")  #=> "ax1" "ax2" "bx1" "bx2"

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.