我的Shinydashboard应用程序未部署:捆绑包不包含清单文件

我的Shinydashboard应用程序未部署:捆绑包不包含清单文件,shiny,shiny-server,shinydashboard,shinyapps,Shiny,Shiny Server,Shinydashboard,Shinyapps,我是RShiny的新手,我决定创建我的第一个应用程序 当我用这个命令启动我的应用程序时,它会立即执行,一切正常 shinyApp(ui, server) 但是当我试图将我的应用程序部署到Shinyapps.io服务器时,我出现了这个错误 错误:未处理的异常:子任务547685425失败:错误分析 清单:捆绑包不包含清单文件:data/données.xlsx 看起来Shiny找不到我的文档données.xlsx,我在这里读取应用程序的数据,但我在代码中做的第一件事是设置目录 这是我的密码:

我是RShiny的新手,我决定创建我的第一个应用程序

当我用这个命令启动我的应用程序时,它会立即执行,一切正常

shinyApp(ui, server)
但是当我试图将我的应用程序部署到Shinyapps.io服务器时,我出现了这个错误

错误:未处理的异常:子任务547685425失败:错误分析 清单:捆绑包不包含清单文件:data/données.xlsx

看起来Shiny找不到我的文档données.xlsx,我在这里读取应用程序的数据,但我在代码中做的第一件事是设置目录

这是我的密码:

setwd("C:/Users/Baillargeon/Desktop/R_PROG/RShiny_test")

library(shiny)
library(shinydashboard)
library(DT)
library(rsconnect)
library(ggplot2)
library(plotly)
library(dplyr)
library(xlsx)

donnees <- read.xlsx("data/données.xlsx", sheetName = "donnees", encoding = "UTF-8")

[...]

ui <- dashboardPage(


      dashboardHeader(title = "Employés"),
      dashboardSidebar(
        sidebarMenu(
          menuItem("Jeu de données",tabName="Donnees",icon=icon("database")),
          menuItem("Graphiques",tabName="graph",icon=icon('signal'))
        )
      ),

      dashboardBody(
        tabItems(

          tabItem(tabName="Donnees",
                  h2("Données"),
                  DT::dataTableOutput("donnees")
                 ),

          tabItem(tabName = "graph", h2("Graphiques"),
                  fluidRow(
                    box(plotlyOutput("plot_sites")),
                    box(plotlyOutput("plot_sexe"))

                          )
                 )
                )
        )
)


server <- function(input,output){

  output$donnees = DT::renderDataTable({

    donnees
  })

  output$plot_sites <- renderPlotly({
    plot_ly(final_sites, labels= final_sites$Site, values= final_sites$Freq, type="pie",
            textposition = 'inside',
            textinfo = 'label+percent',
            showlegend = FALSE
           ) %>%
          layout(title="Répartition des employés selon l'arondissement")
  })

  output$plot_sexe <- renderPlotly({
    plot_ly(final_sexe, labels= final_sexe$Sexe, values= final_sexe$Freq, type="pie",
            textposition = 'inside',
            textinfo = 'label+percent',
            showlegend = FALSE
    ) %>%
      layout(title="Répartition des employés selon leurs Sexe")
  })


}


shinyApp(ui, server)


rsconnect::deployApp("C:/Users/Baillargeon/Desktop/R_PROG/RShiny_test")
setwd(“C:/Users/Baillargeon/Desktop/R\u PROG/RShiny\u test”)
图书馆(闪亮)
图书馆(shinydashboard)
图书馆(DT)
图书馆(rsconnect)
图书馆(GG2)
图书馆(绘本)
图书馆(dplyr)
图书馆(xlsx)
donnees删除
setwd(“C:/Users/Baillargeon/Desktop/R\u PROG/RShiny\u test”)
作为第一行。 在shinyapps.io上部署时,它是一个linux环境。所以
C://
毫无意义

此外,默认情况下,您的工作目录是
ui.R
server.R
所在的位置。因此,您的数据文件夹路径应该与此相关。从你的代码来看是这样的

阅读文档

希望能有帮助