簡體   English   中英

閃亮的HTML元素和DT :: renderDataTable輸出

[英]Shiny HTML Element and DT::renderDataTable output$

我的網頁以HTML格式完成,並通過HTML元素的簡單output $匹配ID連接到Shiny。

為了表示網頁上的表格數據,以下代碼可以正常工作:

服務器

output$InfoTable <- renderTable({...})

index.html

<div id="InfoTable " class="shiny-html-output"></div>

現在我的問題...

這對DataTable如何起作用?

output$InfoDataTable <- DT::renderDataTable({...})

index.html

<div id="InfoDataTable" class="???"></div>

div看起來如何? 我發現數據表不起作用。

謝謝你的幫助!

從控制台運行該應用程序,然后在瀏覽器中進行檢查。 這是什么來彌補我一個datatable默認屬性:

class="datatables html-widget html-widget-output shiny-bound-output"

您需要添加腳本:

' <script src="datatables-binding-0.5/datatables.js"></script> '

而renderDataTable的div類是datatables html-widget html-widget-output

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM