title: "循环补齐"
output: html_document
date: "2023-03-08"
x = c(1,3,5,6,2)
y = c(3,2,5)
x == y## [1] FALSE FALSE TRUE FALSE TRUEx = c(1,3,5,6,2)
y = c(3,2,5)
x == y## [1] FALSE FALSE TRUE FALSE TRUEx > y## [1] FALSE TRUE FALSE TRUE FALSEx < y## [1] TRUE FALSE FALSE FALSE FALSEx + y## [1] 4 5 10 9 4x - y## [1] -2 1 0 3 0x * y## [1] 3 6 25 18 4x / y## [1] 0.3333333 1.5000000 1.0000000 2.0000000 1.0000000paste(x,y,sep = ",")## [1] "1,3" "3,2" "5,5" "6,3" "2,2"paste0(x,y)## [1] "13" "32" "55" "63" "22"paste0(rep("x",3),1:3)## [1] "x1" "x2" "x3"paste0("x",1:3)## [1] "x1" "x2" "x3"paste0(rep("student",times = 7),seq(from = 2, to = 15,by = 2))## [1] "student2" "student4" "student6" "student8" "student10"
## [6] "student12" "student14"paste0("student",seq(2,15,2))## [1] "student2" "student4" "student6" "student8" "student10"
## [6] "student12" "student14"引用自生信技能树
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。