Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reactlog does not work with shinydashboard? #47

Open
dwhdai opened this issue Jul 8, 2019 · 1 comment
Open

reactlog does not work with shinydashboard? #47

dwhdai opened this issue Jul 8, 2019 · 1 comment

Comments

@dwhdai
Copy link

dwhdai commented Jul 8, 2019

reactlog 1.0 does not appear to work with shinydashboard. Is there a plan to implement this compatibility in the future?

@schloerke
Copy link
Collaborator

Do you have an example where it doesn't work?

I can get it to run on a basic example.

library(shiny)
options(shiny.reactlog = TRUE)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(title = "Basic dashboard"),
  dashboardSidebar(),
  dashboardBody(
    # Boxes need to be put in a row (or column)
    fluidRow(
      box(plotOutput("plot1", height = 250)),

      box(
        title = "Controls",
        sliderInput("slider", "Number of observations:", 1, 100, 50)
      )
    )
  )
)

server <- function(input, output) {
  set.seed(122)
  histdata <- rnorm(500)

  output$plot1 <- renderPlot({
    data <- histdata[seq_len(input$slider)]
    hist(data)
  })
}

shinyApp(ui, server)

Screen Shot 2019-07-08 at 12 47 33 PM
(matching port number)
Screen Shot 2019-07-08 at 12 47 15 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants