After I finish plot in r studio and try to publish my work to shiny io. R studio always shows this error message.
And this is my code for the graph:
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)
I can plot in r studio, but I don't know why there is a problem for publish. Thank you for your help. I appreciate it.
this is the error msg:
deployApp() Error in lint(appDir, appFiles, appPrimaryDoc) : Cancelling deployment: invalid project layout. The project should have one of the following layouts: 1. 'shiny.R' and 'ui.R' in the application base directory, 2. 'shiny.R' and 'www/index.html' in the application base directory, 3. 'app.R' or a single-file Shiny .R file, 4. An R Markdown (.Rmd) document, 5. A static HTML (.html) or PDF (.pdf) document.