我已经构建了一个闪亮的应用程序,它使用metricsgraphics来创建直方图。运行应用程序时,我收到以下错误消息:
output$histPlot
(...)中的警告:
忽略显式提供的小部件ID“mjs-acd1c2bc860bf1a81780a7603d6f7b”; Shiny不使用它们
The only place I've seen this warning discussed is on the issues page for metricsgraphics但未提供解决方案。我的应用程序可以使用以下命令运行:
shiny :: runGitHub(repo ='mihiriyer / mental')
我的代码位于:https://github.com/mihiriyer/mental/blob/master/app.R
该应用似乎工作正常,所以甚至应该担心,因为它只是一个警告?我应该压制消息并继续前进吗?
答案 0 :(得分:6)
显然除了抑制警告信息之外别无他法。在Github上发表我的问题,我得到的回答是: https://github.com/hrbrmstr/metricsgraphics/issues/49
基本上,可以将以下行添加到服务器功能部分,并且将禁止警告:
options(warn = -1)