我想在 Shiny 中的一行中添加一个表格,但我找不到这样做的方法。
我知道 Shiny 中有 HTML 标签,例如strong
将单词加粗,small
使它们更小......甚至blockquote
添加引号块。但是我没有找到一个添加一个列表。
有谁知道该怎么做?
可重现的代码:
library(shiny)
ui = pageWithSidebar(
headerPanel("My app"),
sidebarPanel(
),
mainPanel(
htmlOutput("text")
)
)
server = function(input, output) {
output$text <- renderUI({
str1 <- strong("This is the first line in bold:")
str2 <- em("This is the second line in italics and with one tabulation")
HTML(paste(str1, str2, sep = '<br/>'))
})
}
shinyApp(ui,server)