我在 R 语言中有两个不同的字符向量,我想将它们合并用作列名:
groups <- c("Group A", "Group B")
label <- c("Time","Min","Mean","Max")
当我尝试使用粘贴功能时,得到了如下结果:
> paste(groups,label)
[1] "Group A Time" "Group B Min" "Group A Mean" "Group B Max"
有没有一个简单的函数或设置可以将它们粘在一起以获得以下输出?
[1] "Group A Time" "Group A Min" "Group A Mean" "Group A Max" "Group B Time"
[6] "Group B Min" "Group B Mean" "Group B Max"