paste several column values into one value in R

删除回忆录丶 提交于 2019-11-29 02:42:09

Yep, paste() is exactly what you want to do:

 df3$xyz <- with(df3, paste(x,y,z, sep=""))

 # Or, if you want the result to be numeric, rather than character
 df3$xyz <- as.numeric(with(df3, paste(x,y,z, sep="")))
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!