I am a beginner with R. Now, I have a vector in a data.frame like this
city Kirkland, Bethesda, Wellington, La Jolla, Berkeley, Costa, Evie KW172NJ Miami, P
This works as well:
x <- c("London, UK", "Paris, France", "New York, USA") library(qdap) beg2char(x, ",") ## > beg2char(x, ",") ## [1] "London" "Paris" "New York"