x=[1:5]
y=letters(1:5)
paste(y,x)
结果:"a 1" "b 2" "c 3" "d 4" "e 5"
paste(y,x,seq='')
结果:"a1" "b2" "c3" "d4" "e5"
paste(y,x,seq='_')
结果:"a_1" "b_2" "c_3" "d_4" "e_5"
paste(y,x,seq='',collapse='#')
结果:a1#b2#c3#d4#e5
x=[1:5]
y=letters(1:5)
paste(y,x)
结果:"a 1" "b 2" "c 3" "d 4" "e 5"
paste(y,x,seq='')
结果:"a1" "b2" "c3" "d4" "e5"
paste(y,x,seq='_')
结果:"a_1" "b_2" "c_3" "d_4" "e_5"
paste(y,x,seq='',collapse='#')
结果:a1#b2#c3#d4#e5
本文标题:paste函数
本文链接:https://www.haomeiwen.com/subject/cnsjtxtx.html
网友评论