在粘贴功能中插入逗号分隔
Insert a comma to separate in paste function
我想显示这样一个矢量:(使用粘贴功能)
("Label 1", "Label 2", ..., "Label 7")
但是,当我使用粘贴功能时
paste("label", 1:7)
它是这样的:
[1] "label 1" "label 2" "label 3" "label 4" "label 5" "label 6" "label 7" #without the "comma" between characters.
或者,尝试另一种方式
paste("label", 1:7, ",")
[1] "label 1 ," "label 2 ," "label 3 ," "label 4 ," "label 5 ," "label 6 ," [7] "label 7 ," # the "comma" came inside the quotation marks
我在粘贴功能中缺少什么?
dput(paste("Label", 1:7))
给予
c("Label 1", "Label 2", "Label 3", "Label 4", "Label 5", "Label 6",
"Label 7")
我想显示这样一个矢量:(使用粘贴功能)
("Label 1", "Label 2", ..., "Label 7")
但是,当我使用粘贴功能时
paste("label", 1:7)
它是这样的:
[1] "label 1" "label 2" "label 3" "label 4" "label 5" "label 6" "label 7" #without the "comma" between characters.
或者,尝试另一种方式
paste("label", 1:7, ",")
[1] "label 1 ," "label 2 ," "label 3 ," "label 4 ," "label 5 ," "label 6 ," [7] "label 7 ," # the "comma" came inside the quotation marks
我在粘贴功能中缺少什么?
dput(paste("Label", 1:7))
给予
c("Label 1", "Label 2", "Label 3", "Label 4", "Label 5", "Label 6",
"Label 7")