Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. tags$script(HTML("var header = $('.navbar > .container');
  2. header.append('<div Company name text here>')"))
  3.  
  4. library(shiny)
  5.  
  6.  
  7. server <- function(input, output, session) {
  8. output$plot <- renderPlot({
  9. plot(cars, type=input$plotType)
  10. })
  11.  
  12. output$summary <- renderPrint({
  13. summary(cars)
  14. })
  15.  
  16. output$table <- DT::renderDataTable({
  17. DT::datatable(cars)
  18. })
  19. }
  20.  
  21.  
  22. ui <-shinyUI(navbarPage("Navbar!",
  23. tabPanel("Plot",
  24. sidebarLayout(
  25. sidebarPanel(
  26. radioButtons("plotType", "Plot type",
  27. c("Scatter"="p", "Line"="l")
  28. )
  29. ),
  30. mainPanel(
  31. plotOutput("plot")
  32. )
  33. )
  34. ),
  35. tabPanel("Summary",
  36. verbatimTextOutput("summary")
  37. ),
  38.  
  39.  
  40. tags$script(HTML("var header = $('.navbar > .container');
  41. header.append('<div style="float:right"><h3>Company name text here</h3></div>');
  42. console.log(header)"))
  43. ))
  44.  
  45. shinyApp(ui = ui, server = server)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement