我有一个像这样的长时间等待功能 myList <- lapply(X=input,rjson::fromJSON)
.
是否可以为此功能(R-studio)创建可见的进度条?
谢谢!
最佳答案
尝试
myList <- plyr::llply(input,rjson::fromJSON,.progress="text")
llply
是 plyr
lapply
的类似物(它需要一个列表作为输入并返回一个列表);您可以通过 ldply
返回不同的输出类型或 laply
...来自
?plyr::create_progress_bar
:There are currently four types of progress bar: "none", "text", "tk", and "win". See the individual documentation for more details. In plyr functions, these can either be specified by name, or you can create the progress bar object yourself if you want more control over its appe[a]rance. See the examples.
关于r - 为 R 函数创建进度条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36223127/