rshinyshinydashboard

Specifying titleWidth for ShinyDashboard title not working


I am trying to specify the width of my Shiny Dashboard title as is explained here. However I keep getting the error Error in FUN(X[[1L]], ...) : Expected an object with class 'shiny.tag'., but only when I add the extra line for specifying title width titleWidth = 400. Withouth the line, the app runs fine (there is no app just a skeleton page to reproduce the error).

Code is as below:

## app.R ##
library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(
    title = "Title Which is Kinda Long",
    titleWidth = 400
    ),
  dashboardSidebar(),
  dashboardBody()
)

server <- function(input, output) { }

shinyApp(ui, server)

Solution

  • I think you are using version 0.4, the new version which got updated on the 17th of June 2015 is the 0.5. So just update the library shinydashboard

    Look here the updates in the bottom for your case http://cran.rstudio.com/web/packages/shinydashboard/NEWS