rstudio / shiny-examples

Other
1.95k stars 3.78k forks source link

metaHandler Error and issue with sharing Shiny Dashboard #35

Open Rickro051 opened 8 years ago

Rickro051 commented 8 years ago

Hello.

I'm trying to share a shinyApp using shiny Dashboard. The web link that was provided to my by systems administrator at my university seems to only work when the shiny App I'm trying to share isn't using shinyDashboard ui.

The example I'm using in this post is a very abridged version because I simply wanted to see why the ui wasn't showing.

Whenever I click on the link, which I believe was created using the Shiny Server method for Linux servers, I receive this error:

ERROR: argument "metaHandler" is missing, with no default

Here is my example of the dashboard page that returns the error: `

library(shiny) library(shinydashboard) dashboardPage( dashboardHeader( title = "CST" ),

                    dashboardSidebar(
                      sidebarMenu(
                        menuItem
                        ("Home", tabName = "Home"))
                    ),

            dashboardBody(
              fluidPage(
                mainPanel(
                p("It can be difficult to find population information from before 1990. Due to many requests from small communities, the Center for Small Towns is providing all population information for every county, town, and township in Minnesota dating back 1900."),                                
                p(br("This information was compiled from the U.S. Census and the American Community Survey. The following people played an enormous role in gathering this information and developing this website."))
                )
            )        
    )

`

Here is my Server code (I don't have any functions because I'm trying to see why the UI won't show):

` library(shiny) library(shinydashboard)

        shinyServer(function(input, output) { 
        })

` I was told that if I use improper link breaking, that it could generate the error.

However, when I use shinyUI instead of a shinyDashboard page, I'm able to click on the link and I used practically the same line breaking as I did in the shinyDashboard example.

Here is the UI example that works (Server is the same in the above example):

` library(shiny) library(shinydashboard)

            shinyUI(
              fluidPage(
                mainPanel(
                p("It can be difficult to find population information from before 1990. Due to many requests from small communities, the Center for Small Towns is providing all population information for every county, town, and township in Minnesota dating back 1900."),                                
                p(br("This information was compiled from the U.S. Census and the American Community Survey. The following people played an enourmous role in gathering this information and developing this website."))
                )
              )
            )

    `

ONLY the shinyUI version seems to not generate that error when I attempt to use the link provided by the systems administrator.

I currently use my university's rstudio server at rstudio.morris.umn.edu. The shiny sever that we use is, I believe, CentOS/RHEL 5 (64 bit), so I don't believe he built the server from source.

Is it possible the shinyDashboard can't be shared via the method Linux Servers use?

Thanks,

Ricky.

wch commented 8 years ago

What link are you clicking on?

Also, could you fix the formatting in the comment to make it easier to understand the code? See https://guides.github.com/features/mastering-markdown/

Rickro051 commented 8 years ago

Hi, Winston. Sorry about the formatting.

First, here is the link that was provided to me:

http://rstudio.morris.umn.edu:4949/ShinyApps/

As I understand it, this is serving as a directory to a folder in the rstudio server for the University of Minnesota Morris campus. The ui and server that I'm referring to in these posts are in "test.small"

Also, "newApp" and "test.Ricky4" are dashboard examples that generate the same metaHandler error.

The "Center for Small Towns Data Page" link is the only one that works and it is not using a dashboard page.

Here is the edited code:

dashboard example:

library(shiny)
library(shinydashboard)

    dashboardPage(
        dashboardHeader(
            title = "CST"
        ),

        dashboardSidebar(
            sidebarMenu(
                menuItem
                  ("Home", tabName = "Home"))
        ),

        dashboardBody(
            fluidPage(
                mainPanel(
                  p("It can be difficult to find population information from before 1990. Due to many requests from small communities, the Center for Small Towns is providing all population information for every county, town, and township in Minnesota dating back 1900."),                                
                  p(br("This information was compiled from the U.S. Census and the American Community Survey. The following people played an enourmous role in gathering this information and developing this website."))
        )        
      )
    )

)

And here is the shinyUI example.

library(shiny)
library(shinydashboard)

shinyUI(
              fluidPage(
                mainPanel(
                p("It can be difficult to find population information from before 1990. Due to many requests from small communities, the Center for Small Towns is providing all population information for every county, town, and township in Minnesota dating back 1900."),                                
                p(br("This information was compiled from the U.S. Census and the American Community Survey. The following people played an enourmous role in gathering this information and developing this website."))
                )
              )
            )