如何防止checkShinyVersion中的错误?

时间:2018-10-30 16:23:14

标签: r shiny

我的R Shiny App在R-studio服务器中运行正常。但是今天,当我在R-studio服务器中运行它时,出现了一个错误:

  

checkShinyVersion()中的错误:请升级“ shiny”包   (至少)为1.1版

我的app.R脚本开头有"slots": [ { "description": "string", "name": "string", "priority": number, "responseCard": "string", "sampleUtterances": [ "string" ], "slotConstraint": "string", "slotType": "string", "slotTypeVersion": "string", "valueElicitationPrompt": { "maxAttempts": number, "messages": [ { "content": "string", "contentType": "string", "groupNumber": number } ], "responseCard": "string" --(how to pass title, imageUrl and other attributes) } ,因为我打算为此应用设置专用路径,以便其他R脚本不会更改软件包。

所以这是所有路径;第二个是我无法控制的系统默认R库路径。

  

> .libPaths()

     

[1]“ /home/jack/R/SLE_shinyApp/3.5”“ /app/x86_64/R/v3.5.0/lib64/R/library”

事实证明,.libPaths(c('/home/jack/R/SLE_shinyApp/3.5'))软件包(htmlwidgets的依赖项)仅位于第二条路径中,自上次运行以来已由系统管理员更新,从而导致错误。

这是我的解决方案和问题:

  1. 仅进行R搜索shiny,因此我可以在此处安装所有需要的软件包和依赖项。但是如何使R仅搜索/home/jack/R/SLE_shinyApp/3.5中的路径?

  2. 更新app.R中的shiny软件包。但是,如果我逐行运行/home/jack/R/SLE_shinyApp/3.5,它将使用app.R中的shiny v1.1并运行正常。但是,如果我通过单击“运行应用程序”按钮运行/home/jack/R/SLE_shinyApp/3.5,即使在app.R之后是library(shiny, lib.loc = .libPaths()[1]),它也会在第二条路径中使用旧的光泽,并且仍然会给出错误。

有人可以帮忙吗?

0 个答案:

没有答案
相关问题