having troubles deploying an app locally

1,535 views
Skip to first unread message

ignacio martinez

unread,
Apr 3, 2015, 11:20:42 AM4/3/15
to shiny-...@googlegroups.com
Hi,

I installed shiny server using docker and I'm having troubles deploying an app to that local server.

this is the error I get:

Error in shinyAppDir(x) : App dir must contain either app.R or server.R. Calls: runApp ... as.shiny.appobj -> as.shiny.appobj.character -> shinyAppDir Execution halted

The directory contains server.R, so I don't really understand what is wrong.

This is the ui.R

library(shiny)

shinyUI(fluidPage(
  fluidRow(

    column(4,
           
           # Copy the line below to make a slider range 
           sliderInput("slider2", label = h3("Slider Range"), min = 0, 
                       max = 100, value = c(-100, 100)),
           checkboxGroupInput("checkGroup", label = h3("Checkbox group"), 
                              choices = list("A1" = "A1", "A2" = "A2", "B2" = "B2", "B4"="B4", "C9"="C9"),
                              selected = c("A1", "A2", "B2", "B4", "C9"))
    )
  ),
  
  hr(),
  
  fluidRow(
    DT::dataTableOutput('tbl')
  )
  
))

and this is the server.R

library(shiny)
library(DT)
library(dplyr)
set.seed(422015)
DF1 <- data.frame(V1=sample(x = c("A1", "A2", "B2", "B4", "C9"), size = 100, replace = T),
                  V2=runif(n = 100,min = -100, max = 100))
DF1 %>%
  group_by(V1) %>%
  summarise(mean=mean(V2)) %>%
  datatable()

shinyServer(function(input, output) {
  observe({
    
    output$tbl = renderDataTable({
      DF1 %>%
        filter(V2>input$slider2[1], V2<input$slider2[2], 
               V1 %in% input$checkGroup) %>%
        group_by(V1) %>%
        summarise(mean=mean(V2)) %>%
        datatable(extensions = 'TableTools', 
                  rownames = FALSE, 
                  options = list(pageLength = 5, lengthMenu = c(5, 10, 15, 50, 100),
                                 dom = 'T<"clear">lfrtip',
                                 tableTools = list(sSwfPath = copySWF())
                  ))
    })
    
    
  })

})



Thanks for the help!

Ignacio

Xandria Webb

unread,
May 13, 2015, 12:34:24 PM5/13/15
to shiny-...@googlegroups.com
I'm having the same issue, and would also appreciate some suggestions. Did you find a resolution, Ignacio?

ignacio martinez

unread,
May 13, 2015, 12:36:19 PM5/13/15
to shiny-...@googlegroups.com
Are you on linux? chmod -R 777 /'directory where you have your app'

Tanushree Pareek

unread,
Jun 16, 2018, 6:29:44 PM6/16/18
to Shiny - Web Framework for R
hello all,

Did anybody get the solution?
I am having the same issue, I am making the package of shiny but once someone installed this and run the application, getting the same error.

Tanushree Pareek

unread,
Jun 18, 2018, 9:20:05 AM6/18/18
to Shiny - Web Framework for R
Its resolved now. 

YASHVI GOYAL

unread,
May 19, 2020, 3:32:24 PM5/19/20
to Shiny - Web Framework for R
Error in shinyAppDir(x) : App dir must contain either app.R or server.R.

I am getting this error on R console.
can someone help me.
Reply all
Reply to author
Forward
0 new messages