I have a shiny app that allows the user to specify a bunch of options for building a statistical model, and the end result is supposed to be the output of a series of regression coefficients, as shown in this screenshot of a simple print()
to the console:
However, when I try to render that exact message to my Shiny UI, newlines are ignored, resulting in a jumbled mess of characters, like this:
unmarkedFrame Object 16 sites Maximum number of observations per site: 23 Mean number of observations per site: 4.38 Number of primary survey periods: 23 Number of secondary survey periods: 1 Sites with at least one detection: 16 Tabulation of y observations: 0 1 22 48 298 Site-level covariates: site Elevation Min. : 1.00 Min. : 148.2 1st Qu.: 4.75 1st Qu.:1085.0 Median : 8.50 Median :1318.2 Mean : 8.50 Mean :1604.8 3rd Qu.:12.25 3rd Qu.:2264.2 Max. :16.00 Max. :2958.9 NA's :4 Yearly-site-level covariates: Year 2016 :80 2013 :64 2014 :48 2015 :48 2017 :48 2012 :32 (Other):48 Year 2016 :80 2013 :64 2014 :48 2015 :48 2017 :48 2012 :32 (Other):48
So the question is:
How can I get the text to output to my shiny webpage while maintaining the readable formatting of the console output?
I found the following related question, but neither answer seemed to solve my problem...