Shiny R renderText paste new line and bold

前端 未结 1 2187
傲寒
傲寒 2021-02-20 10:36

I have the following:

output$count <- renderText({
#some input

    paste(\"Your length is:\" , input$length , \"Your weight is:\" , weight , 
\"Your age is:\         


        
1条回答
  •  温柔的废话
    2021-02-20 11:09

    Something like this?

    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("Your length is: ", input$length, "
    ", "Your weight is: ", input$weight, "
    ") }) }) shinyApp(ui = ui, server = server)

    0 讨论(0)
提交回复
热议问题