dt

R -shiny- DT: how to update col filters

雨燕双飞 提交于 2021-01-04 03:12:40
问题 I would like to use DT to allow the users to modify a dataset. However, when the factor cols change (by adding or removing a factor level) the corresponding table filter remains unchanged. In the following example: if I change a Species, the new Species does not appear in the filter dropdown list. Is there a workaround? Many thanks! library(shiny) library(DT) library(dplyr) iris2=iris %>% group_by(Species) %>% filter(Petal.Length==max(Petal.Length)) ui <- fluidPage( fluidRow(column(12,

R -shiny- DT: how to update col filters

女生的网名这么多〃 提交于 2021-01-04 03:12:32
问题 I would like to use DT to allow the users to modify a dataset. However, when the factor cols change (by adding or removing a factor level) the corresponding table filter remains unchanged. In the following example: if I change a Species, the new Species does not appear in the filter dropdown list. Is there a workaround? Many thanks! library(shiny) library(DT) library(dplyr) iris2=iris %>% group_by(Species) %>% filter(Petal.Length==max(Petal.Length)) ui <- fluidPage( fluidRow(column(12,

R DT datatable font size change

依然范特西╮ 提交于 2020-12-13 07:11:51
问题 I want to change the font size of the entire data table., The default size is too large for what I want to display. I am trying to change the font-size of variable names and column content with formatStyle as follows library(DT) library(magrittr) iris %>% datatable() %>% formatStyle(columns = colnames(.), `font-size` = '25%') But, what is rendered is the same font size regardless of the changes. Tried different formats for font-size such as 'large, small' '150%, 50%' and '10px,20px,30px' 回答1: