我是 R 新手并尝试使用动画包。从手册中,我尝试运行此代码段
library(animation)
oopt = ani.options(interval = 0.2, nmax = 10)
## use a loop to create images one by one
for (i in 1:ani.options("nmax")) {
plot(rnorm(30))
ani.pause() ## pause for a while (’interval’)
}
## restore the options
ani.options(oopt)
但我得到了错误:
Error in ani.options(oopt) : object 'oopt' not found
我已经安装了包,我使用的是 2.14.2 版