I understand from above link that we are able to use a particular column (V6) for condition, and highlight the other column (V1). For my case, I have more than one column for condition (Diff1, Diff4), and I want to highlight the other columns (Reco1, Speed1) based on Diff1 column, and other columns (Reco4, Speed4) based on Diff4 column.
As what is seen here attached.
My code is as below:
formatstyle_input <- c('Diff1','Diff4') DT::datatable(UpdatedActualRecoScrewSpeed(),rownames = FALSE,options = list(paging = FALSE)) %>% formatStyle(formatstyle_input, backgroundColor = styleInterval(c(0, 1, 2), c('#33FF33', 'yellow', 'orange','#FF6666')))
How should I modify my code for my needs? Also, after highlighting columns (Reco1, Speed1,Reco4,Speed4), is it possible to hide the columns (Diff1,Diff4)?