Insert vertical bar between each character of a string in R

Viewed 760

How would I be able to insert a vertical bar in between every character of a string in R? For example, say I have a string "ABC123". How could I obtain the output to be "A|B|C|1|2|3"? If anyone could vectorize this idea for a vector of character strings, that would be great.

2 Answers
Related