2015-05-27 29 views
1

我像一个月前一样安装了“beepr”包,当我完成一个长脚本时发出警告。我一直工作到现在。 我不知道为什么,当我调用该函数在Rstudio它打印错误:R在beepr包中出现R {beepr}错误

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版本3.0.2

OS: “x86_64的,Linux的GNU”

回答

1

我在这里同exerience。深入研究代码,发现问题与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