Closed lianos closed 11 years ago
For what it's worth, the output from print(xtable(df), type="html")
leads with a comment banner that let's you know xtable
is doing the leg work, eg:
<!-- html table generated in R 3.0.1 by xtable 1.7-1 package -->
<!-- Wed Aug 7 14:01:58 2013 -->
<TABLE ...>
... the table in here ...
</TABLE>
If that'd be helpful ...
I use the same xtable code blocks to put html tables in my Rmd files as well. knitrBootstrap explicitly wraps any table with a div.output to mark them as output. To remove this functionality just remove the wrap function call. See the following lines.
https://github.com/jimhester/knitrBootstrap/blob/master/inst/templates/knitr_bootstrap.js#L57-L58
I can see your point about not setting them as output though, I will think about it some more to decide whether to remove the wrap by default or not. Thank you for submitting the issue and for using the package, I am glad you like it!
Many times when I generate
*.Rmd
reports, I'd like to runknit_bootstrap
withshow_code=FALSE, show_output=FALSE, show_plot=TRUE
since I want the people I'm sharing these with to focus on the results -- the ability to toggle these on/off interactively in the web page is really awesome.Still, even though I usually (95% of the time) do not want R's output to by shown be default, there are times when I am relying on R's output to be part of the document. A concrete example is when I want to include a tabular result into the web page itself. To do so, I'm using the xtable package to convert
data.frame
s to HTML tables, something like: