Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
找不到函数“;chartJSRadarOutput“;在闪亮的服务器中_R_Shiny_Rstudio_Shiny Server - Fatal编程技术网

找不到函数“;chartJSRadarOutput“;在闪亮的服务器中

找不到函数“;chartJSRadarOutput“;在闪亮的服务器中,r,shiny,rstudio,shiny-server,R,Shiny,Rstudio,Shiny Server,我有一个闪亮的应用程序,我在Ubuntu的rstudio上成功运行了它 但是,我在Shinny server目录中使用相同的文件,当我从Shinny server从浏览器访问应用程序时,会出现以下错误: ERROR: could not find function "chartJSRadarOutput" ERROR: there is no package called ‘radarchart’ 如何才能在Rstudio中成功运行它,但不能在Shining server中成功运行,我该怎么

我有一个闪亮的应用程序,我在Ubuntu的rstudio上成功运行了它

但是,我在Shinny server目录中使用相同的文件,当我从Shinny server从浏览器访问应用程序时,会出现以下错误:

ERROR: could not find function "chartJSRadarOutput"
ERROR: there is no package called ‘radarchart’
如何才能在Rstudio中成功运行它,但不能在Shining server中成功运行,我该怎么办

是否可以检查Shining server studio是否可以看到已安装的radarchart库?我已经通过RStudio安装了,但我不确定闪亮的服务器是否看到了它们

I用户库(radarchart)和rstudio中再次运行,但在闪亮服务器中出现以下错误:

ERROR: could not find function "chartJSRadarOutput"
ERROR: there is no package called ‘radarchart’

您的服务器上似乎没有安装radarchart库

您可以使用以下代码尝试在服务器上加载该库,如果未安装该库,它将尝试安装该库

lapply(c('radarchart'), function(package) {
  if(!require(package, character.only = TRUE)) {
    tryCatch({
      install.packages(package)
    },
    warning = function(w) {
      NULL
    },
    error = function(e) {
      NULL
    },
    finally = {
      require(package, character.only = TRUE)
    }
    )
  }
}
)

非常感谢。我必须在哪个文件中添加行?i、 在代码开头的server.r文件中?我也在ui.r文件中添加了代码,因为它需要在两个文件中查看库,但现在我收到了此错误
错误:没有名为“package”的包
对此有帮助吗?