简体   繁体   中英

Specifying titleWidth for ShinyDashboard Title not Working

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...Any help greatly appreciated.

## 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)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM