[英]Make DT (DataTable) responsive using flexdashboard with Shiny in R
The following example (file ex.Rmd
) results in a horizontal scrollbar when the window width is small.以下示例(文件
ex.Rmd
)在窗口宽度较小时产生水平滚动条。 Any way to make the table fully responsive, ie remove the horizontal scroll and add the columns under the collapsed information?有什么方法可以使表格完全响应,即删除水平滚动并在折叠信息下添加列?
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: fill
runtime: shiny
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
library(flexdashboard)
library(DT)
```
Menu
=======================================================================
Row
-----------------------------------------------------------------------
### Testing
```{r}
renderDT(head(mtcars), extensions = c('Responsive'))
```
What about关于什么
renderDT({
datatable(head(mtcars), extensions = c('Responsive'),
options = list(responsive = TRUE))
})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.