r - 为 R 函数创建进度条

标签 r

我有一个像这样的长时间等待功能 myList <- lapply(X=input,rjson::fromJSON) .
是否可以为此功能(R-studio)创建可见的进度条?
谢谢!

最佳答案

尝试

myList <- plyr::llply(input,rjson::fromJSON,.progress="text")
llplyplyr 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/

相关文章:

javascript - Node.JS-R,Python 繁重计算识别回调何时返回并存储该结果

r - 如何在 R 中将 str_split 与正则表达式一起使用?

r - 在 Shiny R 应用程序中使用 read.xlsx

从包含多个文档的语料库中删除行

r - 如何读取 "Debian control file"(DCF)格式的数据?

r - 找不到函数 ".getNamespace"

r - 使用ggplot2中的scale_fill_brewer()函数设置数据断点

r - 使用 Sparklyr 在 R 中选择 N 行

r - 根据R中的数据帧名称合并存储在不同长度列表中的数据帧

r - 数字变量和 boolean 变量之间的相关性