【发布时间】:2017-05-02 08:58:37
【问题描述】:
我有两个向量
df1 <- c("a","b","c")
df2 <- c("1","2","3")
# expected output
# a1 a2 a3 b1 b2 b3 c1 c2 c3
我见过Paste all combinations of a vector in R,但是,这并不能解决我的困境。
【问题讨论】:
-
试试:
as.vector(t(outer(c("a","b","c"),c(1,2,3),'paste0')))
标签: r vector combinations paste