[R] decimal places in R2HTML

Joshua Wiley jwiley.psych at gmail.com
Sun Jan 27 05:05:59 CET 2013


 Realized I did not reply to this list.

On Sat, Jan 26, 2013 at 7:54 PM, Joshua Wiley <jwiley.psych at gmail.com> wrote:
>  Hi Erin,
>
> Most packages creating output for inclusion in pages, reports, books,
> etc. do some rounding as R's default level of printed precision tends
> to be overkill.  R2HTML is no different, but you can control this.  To
> see what it currently is:
>
> getOption("R2HTML.format.digits")
>
> and you can set it via:
>
> options("R2HTML.format.digits" = 4)
>
>
> after which, I get:
>
>> HTML(confint(aov(Sepal.Length ~ Species, iris)), file=stdout())
>
> <p align= center >
> <table cellspacing=0 border=1><caption align=bottom
> class=captiondataframe></caption>
> <tr><td>
>  <table border=0 class=dataframe>
>  <tbody> <tr class= firstline > <th></th><th>2.5 %</th><th>97.5 %</th> </tr>
>
> <tr><td class=firstcolumn>(Intercept)</td>
> <td class=cellinside>4.8621</td>
> <td class=cellinside>5.1499</td></tr>
>
> <tr><td class=firstcolumn>Speciesversicolor</td>
> <td class=cellinside>0.7265</td>
> <td class=cellinside>1.1335</td></tr>
>
> <tr><td class=firstcolumn>Speciesvirginica</td>
> <td class=cellinside>1.3785</td>
> <td class=cellinside>1.7855</td></tr>
>
>  </tbody>
> </table>
>  </td></table>
>  <br>
>
> Cheers,
>
> Josh
>
>
> On Sat, Jan 26, 2013 at 7:36 PM, Erin Hodgess <erinm.hodgess at gmail.com> wrote:
>> Dear R People:
>>
>> I have an AOV model that I get confidence intervals from via
>>
>>> confint(chick1.aov1)
>>         2.5 %   97.5 %
>> trtA 1.472085 1.607915
>> trtB 1.512085 1.647915
>> trtC 1.328751 1.464582
>>>
>>
>> I am using R2HTML to produce HTML output.  However, the HTML code
>> itself just has rounded values, i.e., 1.5 and 1.6.
>>
>> Has anyone run across this, please?
>> Any suggestions would be much appreciated.
>> Sincerely,
>> Erin
>>
>>
>> --
>> Erin Hodgess
>> Associate Professor
>> Department of Computer and Mathematical Sciences
>> University of Houston - Downtown
>> mailto: erinm.hodgess at gmail.com
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
>
>
> --
> Joshua Wiley
> Ph.D. Student, Health Psychology
> Programmer Analyst II, Statistical Consulting Group
> University of California, Los Angeles
> https://joshuawiley.com/



--
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/



More information about the R-help mailing list