R中的beepr包中出现{beepr}错误



我一个月前安装了"beepr"包,当我完成一个很长的脚本时,它会警告我。直到现在我都工作得很好。我不知道为什么当我在Rstudio中调用函数时,它打印了一个错误:

beep (9)

Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
Please use (fixed|coll|regexp)(x, ignore_case = TRUE) instead of ignore.case(x)
Warning message:
In value[[3L]](cond) :
  beep() could not play the sound due to the following error:
Error in play.default(x, rate, ...): no audio drivers are available
我不知道以前和现在有什么不同。有什么建议可以解决这个问题吗?

R version 3.0.2

操作系统:"x86_64, linux-gnu"

我在这里也有同样的经历。深入研究代码,发现问题与is_wav_fname函数有关,该函数使用了已弃用的ignore.case(...)函数。

如果你替换:

str_detect(fname, ignore.case(".wav$"))

…:

str_detect(fname, fixed(".wav", ignore_case=TRUE))

…它会解决问题。我已经在作者的GitHub页面上发布了一个修复建议的问题;见https://github.com/rasmusab/beepr/issues/11

最新更新