html - shinyapp 在 ui 中加粗
问题描述
我想在句子的 UI 中加几个粗体字。我不确定HTML 标签在h()
. 任何帮助将不胜感激。提前谢谢了。
library(shiny)
ui <- navbarPage(
title = 'Benvenuto',
tabPanel('read.me', icon = icon("book-open"), column(4,
h3("Welcome to Interactive User Interface"),
tags$b("Please wait/refresh.", style="color:red"),
h3("Table"),
h4("Pivot table."),
h2("I HAVE A LONG SENTENCE HERE AND I WANT A FEW WORDS TO BE BOLD ONLY."),
)),
tabPanel('Table', icon = icon("table"), rpivotTableOutput("pivot") ),
id="navbar" )
server <- function(input, output) {
output$pivot <- renderRpivotTable({
rpivotTable(data = mtcars,
rows = "cyl",
cols = c("am", "gear", "carb"),
#vals = "Freq", aggregatorName = "Count", rendererName = "Table", subtotals = TRUE) # use this or below line
#aggregatorName = "Sum as Fraction of Columns", vals = "Freq", rendererName = "Table Barchart")
aggregatorName = "Sum as Fraction of Rows", vals = "cyl", rendererName = "Table With Subtotal")
#width="200%", height="600px")
})
}
shinyApp(ui, server)
预期的答案,我这里有一个很长的句子,我想要几个粗体字
解决方案
您可以使用该HTML
功能只使用这样的标签:
HTML("<h2>I HAVE A LONG SENTENCE HERE AND I WANT <b>A FEW WORDS</b> TO BE BOLD ONLY.</h2>")
推荐阅读
- javascript - 将 import() 转换为同步
- javascript - 从javascript函数悬停图像弹出div
- json - 如何让我的 Swift 代码从 JSON 文件中读取特定信息
- java - 使用 SimpleDateFormat 格式化字符串解析异常?
- python - 修复我的脚本中的浮动错误(需要帮助)Python
- python - 当任何新进程开始时获取信号
- php - 将变量传递给 array_multisort
- vba - 宏无法访问工作表:错误 1004:应用程序/对象定义错误
- python - 使用 python scipy.optimize.basinhopping 在 exp 中溢出
- c# - 将 ASP.NET Core 应用程序连接到 Google Cloud SQL