无法使用r studio中的闪亮发布图形

时间:2018-02-20 21:41:30

标签: r shiny rstudio shiny-server shinydashboard

在我完成r studio中的情节并尝试将我的作品发布到闪亮的io之后。 R studio总是显示error message

这是我的图表代码:

install.packages("shiny")
library(shiny)

path ='C:/Users/rache/Downloads/r/shiny'
setwd(path)
data1=fread("category_table.csv")

head(data1)
ui <- fluidPage(

titlePanel("Histogram"),

sidebarLayout(

sidebarPanel( ),

mainPanel(

  plotOutput(outputId = "distPlot")

)
)
)

server <- function(input, output) {

  output$distPlot <- renderPlot({

     hist(data1$category_id, col = "#75AADB", border = "white",
     xlab = "number of parent product category",
     main = "Histogram of category product")
  })

}

shinyApp(ui, server)

我可以在r studio中绘图,但我不知道为什么发布有问题。谢谢您的帮助。我很感激。

这是错误消息:

  

deployApp()   lint中的错误(appDir,appFiles,appPrimaryDoc):     取消部署:项目布局无效。   该项目应具有以下布局之一:   1.应用程序基目录中的'shiny.R'和'ui.R',   2.应用程序基目录中的'shiny.R'和'www / index.html',   3.'app.R'或单文件Shiny .R文件,   4. R Markdown(.Rmd)文件,   5.静态HTML(.html)或PDF(.pdf)文档。

0 个答案:

没有答案