2017-01-24 4 views

Antwort

2

Wie wäre es damit:

shinyApp(
    ui = fluidPage(
    tags$head(
     tags$style(
     HTML("tr:first-child, tr:first-child + tr { font-weight: bold }") 
    ) 
    ), 
    fluidRow(
     column(12, tableOutput('table') 
    ) 
    ) 
), 
    server = function(input, output) { 
    output$table <- renderTable(head(iris)) 
    } 
) 
1

Versuchen Sie folgendes:

library(shiny) 

ui <- fluidPage(
    tags$head(
     tags$style(
      "tr:nth-child(1) {font-weight: bold;} 
      tr:nth-child(2) {font-weight: bold;} 
      " 
     ) 
    ), 
    tableOutput("tbl") 
) 

server <- function(input, output){ 

    output$tbl <- renderTable({iris}) 
} 

shinyApp(ui, server) 
Verwandte Themen