Function to create a tab panel with two tables.

tabTableTwo(id, table_one, table_two)

Arguments

id

A string representing the id.

table_one

A string representing the first table.

table_two

A string representing the second table.

Value

A tab panel with two tables.

Examples

dummy_data1 <- data.frame(
  A = 1:5,
  B = letters[1:5]
)
dummy_dt1 <- DT::datatable(dummy_data1)
dummy_data2 <- data.frame(
X = 6:10,
Y = letters[6:10]
)
dummy_dt2 <- DT::datatable(dummy_data2)
tabTableTwo("dummy_id", dummy_dt1, dummy_dt2)
#> <div class="tab-pane" title="Tabel" data-value="Tabel">
#>   <div class="row">
#>     <div class="col-sm-6" align="center">
#>       <div class="shiny-spinner-output-container shiny-spinner-hideui ">
#>         <div class="load-container shiny-spinner-hidden load1">
#>           <div id="spinner-33ca7c548faf886a1ad349371ca1157e" class="loader">Loading...</div>
#>         </div>
#>         <div style="height:400px" class="shiny-spinner-placeholder"></div>
#>         <div class="datatables html-widget html-widget-output shiny-report-size html-fill-item-overflow-hidden html-fill-item" id="dummy_id-list(filter = &quot;none&quot;, vertical = FALSE, data = list(` ` = c(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;), A = 1:5, B = c(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot;)), container = &quot;&lt;table class=\&quot;display\&quot;&gt;\n  &lt;thead&gt;\n    &lt;tr&gt;\n      &lt;th&gt; &lt;/th&gt;\n      &lt;th&gt;A&lt;/th&gt;\n      &lt;th&gt;B&lt;/th&gt;\n    &lt;/tr&gt;\n  &lt;/thead&gt;\n&lt;/table&gt;&quot;, options = list(columnDefs = list(list(className = &quot;dt-right&quot;, targets = 1), list(orderable = FALSE, targets = 0)), order = list(), autoWidth = FALSE, orderClasses = FALSE), selection = list(mode = &quot;multiple&quot;, selected = NULL, &#10;    target = &quot;row&quot;, selectable = NULL)) dummy_id-NULL dummy_id-NULL dummy_id-list(defaultWidth = &quot;100%&quot;, defaultHeight = &quot;auto&quot;, padding = NULL, fill = NULL, viewer = list(defaultWidth = NULL, defaultHeight = NULL, padding = NULL, fill = TRUE, suppress = FALSE, paneHeight = NULL), browser = list(defaultWidth = NULL, defaultHeight = NULL, padding = NULL, fill = FALSE, external = FALSE), knitr = list(defaultWidth = NULL, defaultHeight = NULL, figure = FALSE)) dummy_id-list(list(name = &quot;jquery&quot;, version = &quot;3.6.0&quot;, src = list(file = &quot;lib/3.6.0&quot;), meta = NULL, script = &quot;jquery-3.6.0.min.js&quot;, stylesheet = NULL, head = NULL, attachment = NULL, package = &quot;jquerylib&quot;, all_files = TRUE), list(name = &quot;dt-core&quot;, version = &quot;1.13.4&quot;, src = list(file = &quot;/home/runner/work/_temp/Library/DT/htmlwidgets/lib/datatables&quot;), meta = NULL, script = &quot;js/jquery.dataTables.min.js&quot;, stylesheet = c(&quot;css/jquery.dataTables.min.css&quot;, &quot;css/jquery.dataTables.extra.css&quot;), head = NULL, attachment = NULL, &#10;    package = NULL, all_files = FALSE), list(name = &quot;jquery&quot;, version = &quot;3.5.1&quot;, src = list(file = &quot;lib/jquery&quot;), meta = NULL, script = &quot;jquery.min.js&quot;, stylesheet = NULL, head = NULL, attachment = NULL, package = &quot;crosstalk&quot;, all_files = TRUE), list(name = &quot;crosstalk&quot;, version = &quot;1.2.0&quot;, src = list(file = &quot;www&quot;), meta = NULL, script = &quot;js/crosstalk.min.js&quot;, stylesheet = &quot;css/crosstalk.min.css&quot;, head = NULL, attachment = NULL, package = &quot;crosstalk&quot;, all_files = TRUE)) dummy_id-NULL dummy_id-function (instance) &#10;{&#10;    data = instance[[&quot;x&quot;]][[&quot;data&quot;]]&#10;    if (object.size(data) &gt; 1500000 &amp;&amp; getOption(&quot;DT.warn.size&quot;, TRUE)) &#10;        warning(&quot;It seems your data is too big for client-side DataTables. You may &quot;, &quot;consider server-side processing: https://rstudio.github.io/DT/server.html&quot;)&#10;    data = escapeData(data, escape, colnames)&#10;    data = unname(data)&#10;    instance$x$data = data&#10;    instance&#10;} dummy_id-list()" style="width:100%;height:auto;"></div>
#>       </div>
#>     </div>
#>     <div class="col-sm-6" align="center">
#>       <div class="shiny-spinner-output-container shiny-spinner-hideui ">
#>         <div class="load-container shiny-spinner-hidden load1">
#>           <div id="spinner-43d31ad5c8aad01157865cb8db05277c" class="loader">Loading...</div>
#>         </div>
#>         <div style="height:400px" class="shiny-spinner-placeholder"></div>
#>         <div class="datatables html-widget html-widget-output shiny-report-size html-fill-item-overflow-hidden html-fill-item" id="dummy_id-list(filter = &quot;none&quot;, vertical = FALSE, data = list(` ` = c(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;), X = 6:10, Y = c(&quot;f&quot;, &quot;g&quot;, &quot;h&quot;, &quot;i&quot;, &quot;j&quot;)), container = &quot;&lt;table class=\&quot;display\&quot;&gt;\n  &lt;thead&gt;\n    &lt;tr&gt;\n      &lt;th&gt; &lt;/th&gt;\n      &lt;th&gt;X&lt;/th&gt;\n      &lt;th&gt;Y&lt;/th&gt;\n    &lt;/tr&gt;\n  &lt;/thead&gt;\n&lt;/table&gt;&quot;, options = list(columnDefs = list(list(className = &quot;dt-right&quot;, targets = 1), list(orderable = FALSE, targets = 0)), order = list(), autoWidth = FALSE, orderClasses = FALSE), selection = list(mode = &quot;multiple&quot;, selected = NULL, &#10;    target = &quot;row&quot;, selectable = NULL)) dummy_id-NULL dummy_id-NULL dummy_id-list(defaultWidth = &quot;100%&quot;, defaultHeight = &quot;auto&quot;, padding = NULL, fill = NULL, viewer = list(defaultWidth = NULL, defaultHeight = NULL, padding = NULL, fill = TRUE, suppress = FALSE, paneHeight = NULL), browser = list(defaultWidth = NULL, defaultHeight = NULL, padding = NULL, fill = FALSE, external = FALSE), knitr = list(defaultWidth = NULL, defaultHeight = NULL, figure = FALSE)) dummy_id-list(list(name = &quot;jquery&quot;, version = &quot;3.6.0&quot;, src = list(file = &quot;lib/3.6.0&quot;), meta = NULL, script = &quot;jquery-3.6.0.min.js&quot;, stylesheet = NULL, head = NULL, attachment = NULL, package = &quot;jquerylib&quot;, all_files = TRUE), list(name = &quot;dt-core&quot;, version = &quot;1.13.4&quot;, src = list(file = &quot;/home/runner/work/_temp/Library/DT/htmlwidgets/lib/datatables&quot;), meta = NULL, script = &quot;js/jquery.dataTables.min.js&quot;, stylesheet = c(&quot;css/jquery.dataTables.min.css&quot;, &quot;css/jquery.dataTables.extra.css&quot;), head = NULL, attachment = NULL, &#10;    package = NULL, all_files = FALSE), list(name = &quot;jquery&quot;, version = &quot;3.5.1&quot;, src = list(file = &quot;lib/jquery&quot;), meta = NULL, script = &quot;jquery.min.js&quot;, stylesheet = NULL, head = NULL, attachment = NULL, package = &quot;crosstalk&quot;, all_files = TRUE), list(name = &quot;crosstalk&quot;, version = &quot;1.2.0&quot;, src = list(file = &quot;www&quot;), meta = NULL, script = &quot;js/crosstalk.min.js&quot;, stylesheet = &quot;css/crosstalk.min.css&quot;, head = NULL, attachment = NULL, package = &quot;crosstalk&quot;, all_files = TRUE)) dummy_id-NULL dummy_id-function (instance) &#10;{&#10;    data = instance[[&quot;x&quot;]][[&quot;data&quot;]]&#10;    if (object.size(data) &gt; 1500000 &amp;&amp; getOption(&quot;DT.warn.size&quot;, TRUE)) &#10;        warning(&quot;It seems your data is too big for client-side DataTables. You may &quot;, &quot;consider server-side processing: https://rstudio.github.io/DT/server.html&quot;)&#10;    data = escapeData(data, escape, colnames)&#10;    data = unname(data)&#10;    instance$x$data = data&#10;    instance&#10;} dummy_id-list()" style="width:100%;height:auto;"></div>
#>       </div>
#>     </div>
#>   </div>
#> </div>