我有以下内容:
output$count <- renderText({
#some input
paste("Your length is:" , input$length , "Your weight is:" , weight ,
"Your age is:", age)
Run Code Online (Sandbox Code Playgroud)
我想要三个句子,通常我会使用sep ="\n",但这不起作用.如何使用\n或任何其他方法在粘贴中获取新行?编辑:我也想以粗体显示答案,这可能吗?
Val*_*vić 10
像这样的东西?
app.R
library(shiny)
ui <- shinyUI(fluidPage(
titlePanel("HTML"),
sidebarLayout(
sidebarPanel(
textInput("length",
"Enter your length:"),
textInput("weight",
"Enter your weigth:")
),
mainPanel(
htmlOutput("testHTML")
)
)
))
server <- shinyServer(function(input, output) {
output$testHTML <- renderText({
paste("<b>Your length is: ", input$length, "<br>", "Your weight is: ", input$weight, "</b>")
})
})
shinyApp(ui = ui, server = server)
Run Code Online (Sandbox Code Playgroud)