Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent textOutput from producing line break

I build an application with shinydashboard and try to produce a box with (reactive) text. My code in dashboardBody is

box("Species was found in ", textOutput("Count1"), "of", Count2, "Sites")

Count1 is reactive and based on User Input in the UI. Count2 is defined in global.R.

The Output is:

Species was found in
1
of 134 Sites

So, how do I remove the line breaks? paste() isn't working since it only shows the html code of the textoutput Element.

like image 233
Calosoma Avatar asked Jan 29 '26 20:01

Calosoma


1 Answers

Based on the comments it did work, so here my solution as an answer:

box("Species was found in ", textOutput("Count1", inline = TRUE), "of", Count2, "Sites")

Without inline = TRUE it puts the textOuput()in a div, so that creates the line breaks.

like image 154
ek-g Avatar answered Jan 31 '26 11:01

ek-g



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!