Programmatically color format numeric columns in a datatable
问题 I am looking to color format each numeric column so that it shows a blue range bar depending on the range of each column. Here is a photo on what I am trying to achieve. #Here is the the table I have so far. #I am adding filters to the columns. This works great library(DT) library(magrittr) df = datatable(iris, filter = 'top', options = list(pageLength = 5, autoWidth = TRUE)) #I try to add the blue bars here to the first 2 numeric columns df %>%formatStyle(names(df)[1:2], background =