对于不合适的Title!为列中的多个值中的每一个值创建单独的data.frame行
一些货币都使用一个以上的国家
我有它结合了国家一列的表
df<- data.frame(code=c("DKK","DZD","EGP"), country=c("Denmark, Faroe Islands, Greenland",
"Algeria","Egypt,Palestinian territories"))
code country
1 DKK Denmark, Faroe Islands, Greenland
2 DZD Algeria
3 EGP Egypt,Palestinian territories
我想,这样我结束了
到单独的这种组合场code country
1 DKK Denmark
2 DKK Faroe Islands
3 DKK Greenland
4 DZD Algeria
5 EGP Egypt
6 EGP Palestinian territories
TIA
请参阅[这非常类似的问题](http://stackoverflow.com/questions/21124838/split-thousands-of-columns-at-a-time-by-on-multiple-lines-sort-the-values -一世)。 – BrodieG
像'strsplit'这样的东西在这里可以很好地工作。 –