Reputation: 182
I have an HTML R markdown template that I've been using for a while to render reports. I mainly use DT::datatable()
to report the results in the markdown report so I can use the copy button extension to copy the results into another document for final processing/formatting. Up until about a week ago, this was working fine. However now, my markdown report will only render the first table printed with DT::datatable()
in the report.
I dived down into the raw HTML of the report and found that the first table renders as expected:
However, when I look at where the second table is supposed to be, the table doesn't appear to be getting rendered properly:
Even if I just use DT::datatable()
with the default options, it won't render:
The complete markdown document and the rendered report are at https://github.com/jrf1111/July13_SO_issue
Upvotes: 1
Views: 1459
Reputation: 182
I figured out the issue. In my first call to DT::datatable
I used DOM = 'B'
to enable buttons, but I didn't include t
. For some reason that allowed the first datatable to render properly but prevented any further calls to DT::datatable
from rendering. Setting DOM = 'Bt'
in the first call to DT::datatable
fixed everything.
Upvotes: 1