x<-c(1,2,3,4,5,6,7,8,9,10)
> test_lr<-list()
> for(i in 3:length(x))
+ {
+ test_lr[[1]][i-2]<-sum(x[(i-2):i])
+ }
Error in `*tmp*`[[1]] : subscript out of bounds,
出现这种错误是为什么,怎么改
|
楼主: mashagua
|
1120
1
[问答] list 在计算时出现out of bounds怎么办 |
|
博士生 88%
-
|
| ||
|
|
加好友,备注cda京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明


