【发布时间】:2018-09-12 14:57:52
【问题描述】:
使用 tableOutput 更改单行数据框字体颜色的最简单方法是什么?具体来说,如何将“Right”下的“7”改为绿色。
library(shiny)
shinyApp(
ui = fluidPage(
sidebarLayout(
sidebarPanel(
fluidRow(
tableOutput("view")
)
),
mainPanel(
))),
server = function(input, output, session){
correct <- reactiveValues(num = 7)
wrong <- reactiveValues(num = 4)
skipped <- reactiveValues(num = 9)
togo = 80
output$view <- renderTable(tibble(
Right = correct$num,
Wrong = wrong$num,
Skipped = skipped$num,
ToGo = togo
), spacing = "xs")
}
)
【问题讨论】: