How do I print a string in Shiny S ...
[1]
,"
,Example:
library("shiny")
# Define UI ----
ui <- fluidPage(
mainPanel(
verbatimTextOutput("showstring")
)
)
# Define server logic ----
server <- function(input, output) {
output$showstring <- renderPrint({
mystring <- "DOI (\"10.3390/ijerph15010052\")"
mystring
})
}
# Run the app ----
shinyApp(ui = ui, server = server)
Current (bad) outcome:
The answer (thanks to Limey in the comments) was to use renderText
rather than renderPrint
.