Rprof 在 Bash 上失败 Windows

Rprof fails on Bash for Windows

我正在尝试分析 R 中的函数。但我收到错误:

Fatal error: setting profile timer failed

尝试运行代码时

f <- function() mean(c(1:100)) tmp <- tempfile() Rprof(tmp) f() Rprof(NULL)

我在 Bash 上为 Windows 使用 R 3.3.1。

这可能与尚未实现的定时器系统调用有关https://github.com/Microsoft/BashOnWindows/issues/307

它应该会在下一个内部版本和创作者更新(预计于 2017 年 3 月发布)中修复