代码运行有问题
k<-0
y<-abs(rnorm(1000))
i<-0
#loop:
while(k<3 & i<1000){
+ i<- i+1
+temp<- y[i]
+k<- k+(temp>2)
+
}
rm(temp)
i
输入了这几行代码,发现有运行错误:
Error: unexpected '}' in:
" +
}"
> rm(temp)
Warning message:
In rm(temp) : object 'temp' not found
> i
[1] 0
k<-0
y<-abs(rnorm(1000))
i<-0
#loop:
while(k<3 & i<1000){
+ i<- i+1
+temp<- y[i]
+k<- k+(temp>2)
+
}
rm(temp)
i
输入了这几行代码,发现有运行错误:
Error: unexpected '}' in:
" +
}"
> rm(temp)
Warning message:
In rm(temp) : object 'temp' not found
> i
[1] 0
2018-07-09
举报