Apply a spectral color based on range of values in a field of a DT::datatable().

dt_color_fld(dt, fld_data, fld_style = glue::glue("{fld_data}_clr"), alpha = 1)

Arguments

dt

interactive DT::datatable()

alpha

transparency (0 to 1); default = 0.5

fld

field name in data table