I\'m working in R.
I have a dataset in which some records contain a list of cities and counties instead of just one city or county. I\'m looking for a way to transpose
d = as.data.frame(do.call(rbind, strsplit(dtaFrame$cityCountry, ","))) colnames(d) = c("city", "country") cbind(dtaFrame[,-which(colnames(dtaFrame)=="cityCountry",], d)
should do it.