Created
February 24, 2018 03:17
-
-
Save cecilialee/2237f9114796b24d4f9526ff0bdaf19f to your computer and use it in GitHub Desktop.
Render string in multiple lines using HTML in Shiny. #r #shiny
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
ui = basicPage( | |
textInput("txt1", "Input the first string"), | |
textInput("txt2", "Input the second string"), | |
uiOutput("cat_str") | |
) | |
server = function(input, output) { | |
output$cat_str <- renderUI({ | |
HTML(paste(input$txt1, input$txt2, sep = "<br/>")) | |
}) | |
} | |
shinyApp(ui, server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment