摘要: 循环(生成斐波那契数列为例) for 循环 d[1] = 1 d[2] = 1 for(i in 3:20){ d[i] = d[i-1]+d[i-2] print(d[i])} while 循环 e = rep(0, 10) e[1] = 1 e[2] = 1 i = 3 while (i<=10 阅读全文
posted @ 2020-03-14 22:05 机器快点学习 阅读(3495) 评论(0) 推荐(0) 编辑
摘要: 向量的创建、拼接、转frame # 创建向量 a = c("qiaofen","ouyangfeng","wangyuyan","zhagnwuji","renyingying") b = c(-1/0,1/0,100,100,100) # 向量拼接 rab = rbind(a,b) cab = c 阅读全文
posted @ 2020-03-14 21:32 机器快点学习 阅读(6319) 评论(0) 推荐(0) 编辑