错误:部署Shiny App

时间:2017-07-06 09:08:59

标签: r shiny

当我尝试使用https://www.shinyapps.io/部署我的应用时出现此错误。

错误:'lib.loc'中找不到库树

知道为什么吗?我发现了几个关于它的线索,但对我来说解释并不是很清楚。

这些是我的包裹的位置:

library("plyr", lib.loc="C:/Users/Ktanizar/Documents/R/win-library/3.4")

library("cluster", lib.loc="C:/Program Files/R/R-3.4.1/library")

library("xlsx", lib.loc="C:/Users/Ktanizar/Documents/R/win-library/3.4")

library("seriation", lib.loc="C:/Users/Ktanizar/Documents/R/win-library/3.4")

library("data.tree", lib.loc="C:/Users/Ktanizar/Documents/R/win-library/3.4")

library("DT", lib.loc="C:/Users/Ktanizar/Documents/R/win-library/3.4")

library("shinythemes", lib.loc="C:/Users/Ktanizar/Documents/R/win-library/3.4")

library("clipr", lib.loc="C:/Users/Ktanizar/Documents/R/win-library/3.4")

这是我运行.libPaths()时的结果 [1] “C:/Users/KTanizar/Documents/R/win-library/3.4”     “C:/ Program Files / R / R-3.4.1 / library”

这是rsconnect的路径

rsconnect :: deployApp('C:/ Users / Ketty Noonan / Desktop / Innovation Projects / 0 Market Structure / 5 Innovation / 1 R scripts and notes / R_Shiny / 2 Deploy')

非常感谢任何想法。

1 个答案:

答案 0 :(得分:1)

现在可以使用以下代码:

if(!require("plyr"))
  install.packages("plyr")
if(!require("cluster"))
  install.packages("cluster")
if(!require("xlsx"))
  install.packages("xlsx")
if(!require("seriation"))
  install.packages("seriation")
if(!require("data.tree"))
  install.packages("data.tree")
if(!require("DT"))
  install.packages("DT")
if(!require("shinythemes"))
  install.packages("shinythemes")
if(!require("clipr"))
  install.packages("clipr")

当我更改以下代码时

fluidPage(theme = "bootstrap.css",

来自以下

fluidPage(theme = shinytheme("spacelab"),

希望这有助于某人,谢谢你,Jarko。