is there a way to add a new line when putting text through the UI?
I currently have something like
mainPanel(
h3("This is my app!\n\n"),
h4("Download your data using the choose file button\n\n"),
h4("Thank you for using the app!")
)
but the new lines don't seem to be working.
You can use tahs$h1() to h6() to add headings, or add text using textOutput(). You can add text using text within quotes(" ").
Shiny Tutorial A simple shiny app is a directory containing two R scripts, one is ui. R , which controls the layout and appearance of your app, the other is server. R , which contains the instructions that your computer needs to build your app.
\n
doesn't work in shiny app.
For the new line, you could use HTML tag <br/>
:
mainPanel(
HTML(
paste(
h3("This is my app!"),'<br/>',
h4("Download your data using the choose file button"),'<br/>',
h4("Thank you for using the app!")
)
)
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With