How to update global variable in a while loop?

后端 未结 0 1055
小蘑菇
小蘑菇 2021-02-01 06:02

I can\'t find this anywhere.

Attempt:

i <- 1

while (TRUE){
i <<- i + 1
print(i)
Sys.sleep(2)
}

Why does the global variable not

相关标签:
回答
  • 消灭零回复
提交回复
热议问题